Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The "Unmute User" operation in the Moderation resource allows you to remove a mute status from a user within the Stream Chat platform. This action restores the user's ability to send messages and participate normally after being muted. It is useful in scenarios where a user was temporarily muted due to inappropriate behavior or other moderation reasons, and now the moderator wants to reinstate their communication privileges.

Practical examples include:

  • A moderator mutes a user for spamming and later decides to unmute them after reviewing their behavior.
  • Automatically unmuting users after a timeout period has elapsed.
  • Manually unmuting a user who was muted by mistake.

Properties

Name Meaning
Target User ID The unique identifier of the user to be unmuted. This is the user who currently has a mute applied and will have it removed.

Output

The node outputs a JSON object representing the result of the unmute operation. This typically includes details about the user and their updated moderation status after the unmute action has been performed. The exact structure depends on the Stream Chat API response but generally confirms that the user is no longer muted.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential with permissions to perform server-side moderation actions on the Stream Chat service.
  • The node uses the Stream Chat server client SDK internally to call the unmuteUser method.
  • Proper configuration of the Stream Chat API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Target User ID will cause the operation to fail.
    • Insufficient permissions in the API key credential may prevent unmuting users.
    • Network or API connectivity issues can cause timeouts or errors.
  • Error messages:

    • "Unsupported operation: moderation.unmuteUser": Indicates the operation name or resource is incorrect or not supported; verify the selected operation.
    • Errors related to user not found or permission denied usually come directly from the Stream Chat API and should be resolved by checking user IDs and API credentials.
  • Resolution tips:

    • Double-check the Target User ID for correctness.
    • Ensure the API key used has moderation rights.
    • Review network connectivity and retry if transient errors occur.

Links and References

Discussion