Link Search Menu Expand Document

Mute

/api/v2/room/mute

Post

rooms

jwt


Purpose

To allow a user to turn on or off notifications for a chat room that he/she is the member of.

Body Content [input]

{
    uid: string,
    roomID: string,
    mute: bool
}

Returns if valid [output]

{
    message: string,
    error: 0
}

What the API does

  • Finds the room being referenced by the roomID passed [404].
  • Ensures that uid corresponds to a record in the members field with a status of accepted [403].
  • Updates and saves the room with the record for the members field corresponding to uid having a value equal to mute for its has_muted field.