Prepares payload to be delivered to a mobile device as a push notification in response to a new subscription in a p2p topic.
(fromUid, toUid types.Uid, want, given types.AccessMode, now time.Time)
| 109 | |
| 110 | // Prepares payload to be delivered to a mobile device as a push notification in response to a new subscription in a p2p topic. |
| 111 | func (t *Topic) pushForP2PSub(fromUid, toUid types.Uid, want, given types.AccessMode, now time.Time) *push.Receipt { |
| 112 | receipt := t.preparePushForSubReceipt(fromUid, now) |
| 113 | receipt.Payload.ModeWant = want |
| 114 | receipt.Payload.ModeGiven = given |
| 115 | |
| 116 | receipt.To[toUid] = push.Recipient{} |
| 117 | |
| 118 | return receipt |
| 119 | } |
| 120 | |
| 121 | // Prepares payload to be delivered to a mobile device as a push notification in response to a new subscription in a group topic. |
| 122 | func (t *Topic) pushForGroupSub(fromUid types.Uid, now time.Time) *push.Receipt { |
no test coverage detected