MCPcopy
hub / github.com/tinode/chat / pushForChanDelete

Function pushForChanDelete

server/push.go:146–160  ·  view source on GitHub ↗

Prepares payload to be delivered to a mobile device as a push notification in response to owner deleting a channel.

(topicName string, now time.Time)

Source from the content-addressed store, hash-verified

144
145// Prepares payload to be delivered to a mobile device as a push notification in response to owner deleting a channel.
146func pushForChanDelete(topicName string, now time.Time) *push.Receipt {
147 topicName = types.GrpToChn(topicName)
148 // Initialize the push receipt.
149 return &push.Receipt{
150 Payload: push.Payload{
151 What: push.ActSub,
152 Silent: true,
153 Topic: topicName,
154 Timestamp: now,
155 ModeWant: types.ModeNone,
156 ModeGiven: types.ModeNone,
157 },
158 Channel: topicName,
159 }
160}
161
162// Prepares payload to be delivered to a mobile device as a push notification in response to receiving "read" notification.
163func (t *Topic) pushForReadRcpt(uid types.Uid, seq int, now time.Time) *push.Receipt {

Callers 1

topicUnregMethod · 0.85

Calls 1

GrpToChnFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…