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 theroomID
passed [404]. - Ensures that
uid
corresponds to a record in themembers
field with astatus
ofaccepted
[403]. - Updates and saves the
room
with the record for themembers
field corresponding touid
having a value equal tomute
for itshas_muted
field.