Mute
/api/v2/group/mute
Post
groups
jwt
Purpose
To allow a user to turn on or off notifications for a group that he/she is the member of.
Body Content [input]
{
uid: string,
groupID: string,
mute: bool
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Finds the
group
being referenced by thegroupID
passed [404]. - Ensures that
uid
corresponds to a record in themembers
field with astatus
ofaccepted
[403]. - Updates and saves the
group
with the record for themembers
field corresponding touid
having a value equal tomute
for itshas_muted
field.