Subscribe or unsubscribe user to/from FCM topic (channel).
(uid types.Uid, sub bool)
| 16 | |
| 17 | // Subscribe or unsubscribe user to/from FCM topic (channel). |
| 18 | func (t *Topic) channelSubUnsub(uid types.Uid, sub bool) { |
| 19 | push.ChannelSub(&push.ChannelReq{ |
| 20 | Uid: uid, |
| 21 | Channel: types.GrpToChn(t.name), |
| 22 | Unsub: !sub, |
| 23 | }) |
| 24 | } |
| 25 | |
| 26 | // Prepares a payload to be delivered to a mobile device as a push notification in response to a {data} message. |
| 27 | func (t *Topic) pushForData(fromUid types.Uid, data *MsgServerData, msgMarkedAsReadBySender bool) *push.Receipt { |
no test coverage detected