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
roombeing referenced by theroomIDpassed [404]. - Ensures that
uidcorresponds to a record in themembersfield with astatusofaccepted[403]. - Updates and saves the
roomwith the record for themembersfield corresponding touidhaving a value equal tomutefor itshas_mutedfield.