MCPcopy Create free account
hub / github.com/asternic/wuzapi / updateAndGetUserSubscriptions

Function updateAndGetUserSubscriptions

wmiau.go:126–155  ·  view source on GitHub ↗
(mycli *MyClient)

Source from the content-addressed store, hash-verified

124 pendingPasskeyMu.Lock()
125 delete(pendingPasskeyRequests, userID)
126 pendingPasskeyMu.Unlock()
127}
128
129// peekPendingPasskey checks if there is a pending passkey request for this user
130// WITHOUT consuming it. Used by /session/qr, /session/passkey-status, and
131// /session/passkey-confirm.
132func peekPendingPasskey(userID string) *PendingPasskeyState {
133 pendingPasskeyMu.Lock()
134 state, ok := pendingPasskeyRequests[userID]
135 pendingPasskeyMu.Unlock()
136 if !ok {
137 return nil
138 }
139 return state
140}
141
142// ensureS3ClientForUser loads S3 config from DB and initializes client if not already present (lazy init for reconnect-after-restart)
143func ensureS3ClientForUser(userID string) {
144 GetS3Manager().EnsureClientFromDB(userID)
145}
146
147func sendToGlobalWebHook(jsonData []byte, token string, userID string) {
148 jsonDataStr := string(jsonData)
149
150 instance_name := ""
151 userinfo, found := userinfocache.Get(token)
152 if found {
153 instance_name = userinfo.(Values).Get("Name")
154 }
155
156 if *globalWebhook != "" {
157 log.Info().Str("url", *globalWebhook).Msg("Calling global webhook")
158 // Add extra information for the global webhook

Calls 2

FindFunction · 0.85
GetMethod · 0.80