How to get original message content when using built-in sensitive words, IM moderation, and message callback services?

Description

Instant messaging supports IM moderation, offering:

  • Built-in sensitive words: Automatically blocks or replaces sensitive words before delivery.
  • Professional IM moderation: RC’s content moderation service moderates text, images, voice clips, and short videos to identify sensitive content.
  • Message callback: Sends messages to your app first, letting you decide whether to deliver them. Use this to implement your own moderation or integrate third-party services.

When moderating content, you may also need the original message. This article explains how to get it when using one or more moderation features.

Scenario 1: Only using built-in sensitive words

Get the original message via [Post-messaging Callback].

  • By default, messages with blocked sensitive words skip routing, while replaced ones are routed (only the replaced content).
    Enable the Blocked Message Callback to App Server to route both blocked and replaced messages (the original content is routed).
    Submit a ticket to enable this function.

Scenario 2: Using built-in sensitive words with IM moderation or message callback

If you use RC’s content moderation service or moderate content via [Pre-messaging Callback], you can only get the original message for blocked sensitive words, not replaced ones. Details:

  • For blocked sensitive words, messages aren’t synced to your app server by default. Submit a ticket to enable the Blocked Message Callback to App Server and get the original content via [Post-messaging Callback].

    Blocked messages aren’t sent to the IM moderation service or trigger message callback.

  • If replacement sensitive words aren’t set, RC sends the original message to the IM moderation service or triggers message callback. Get the original content:

    • With IM moderation, [Post-messaging Callback] returns the original content sent for review.

    • With [Pre-messaging Callback], get the original content directly from the callback data.

      Note: If you replace content in the callback, [Post-messaging Callback] returns the replaced content, not the original.

  • If replacement sensitive words are set, RC replaces sensitive words before sending the message to the IM moderation service or triggering [Pre-messaging Callback]]. You can’t get the original content because:

    • The “original content” returned by moderation result callback is already replaced.
    • The “original content” returned by [Pre-messaging Callback] is already replaced.
    • The content returned by [Post-messaging Callback] is already replaced.

:tipping_hand_man: If you moderate content via [Pre-messaging Callback], replace content yourself instead of configuring replacement sensitive words in the RC sensitive word settings.

More support

Got questions? Submit a ticket.