Subscription API event subscriptions-changed


#1

When x user is removed from the group, subscriptions-changed event triggered saying removed argument without room id. Room id is present when added in group. So how would I know from which group user is removed?

Below is the payload that i get when user is added in group with room id [KEY is rid]

{"msg":"changed","collection":"stream-notify-user","id":"id","fields":{"eventName":"XiXP4CRQgoCC5akRj/subscriptions-changed","args":["inserted",{"_id":"N3WFrdBtBzqvP2rvr","open":true,"alert":true,"unread":1,"userMentions":1,"groupMentions":0,"ts":{"$date":1540214977596},"rid":"22ANRp2dAS5MkXSPH","name":"prvchannl","fname":"prvchannl","t":"p","u":{"_id":"XiXP4CRQgoCC5akRj","username":"SanskrutiPatel_8","name":"Sanskruti Patel"},"_updatedAt":{"$date":1540214977598}}]}}

Below is the payload that i get when user is removed from group. Notice that no rid is present.

{"msg":"changed","collection":"stream-notify-user","id":"id","fields":{"eventName":"XiXP4CRQgoCC5akRj/subscriptions-changed","args":["removed",{"_id":"N3WFrdBtBzqvP2rvr","u":{"_id":"XiXP4CRQgoCC5akRj","username":"SanskrutiPatel_8","name":"Sanskruti Patel"}}]}}