MCPcopy
hub / github.com/gotify/server / CollectConnectedClientTokens

Method CollectConnectedClientTokens

api/stream/stream.go:41–51  ·  view source on GitHub ↗

CollectConnectedClientTokens returns all tokens of the connected clients.

()

Source from the content-addressed store, hash-verified

39
40// CollectConnectedClientTokens returns all tokens of the connected clients.
41func (a *API) CollectConnectedClientTokens() []string {
42 a.lock.RLock()
43 defer a.lock.RUnlock()
44 var clients []string
45 for _, cs := range a.clients {
46 for _, c := range cs {
47 clients = append(clients, c.token)
48 }
49 }
50 return uniq(clients)
51}
52
53// NotifyDeletedUser closes existing connections for the given user.
54func (a *API) NotifyDeletedUser(userID uint) error {

Callers 2

CreateFunction · 0.80

Calls 1

uniqFunction · 0.85

Tested by 1