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

Method UpdateState

server/store/store.go:411–416  ·  view source on GitHub ↗

UpdateState changes user's state and state of some topics associated with the user.

(uid types.Uid, state types.ObjState)

Source from the content-addressed store, hash-verified

409
410// UpdateState changes user's state and state of some topics associated with the user.
411func (usersMapper) UpdateState(uid types.Uid, state types.ObjState) error {
412 update := map[string]any{
413 "State": state,
414 "StateAt": types.TimeNow()}
415 return adp.UserUpdate(uid, update)
416}
417
418// GetSubs loads *all* subscriptions for the given user.
419// Does not load Public/Trusted or Private, does not load deleted subscriptions.

Callers

nothing calls this directly

Calls 2

TimeNowFunction · 0.92
UserUpdateMethod · 0.65

Tested by

no test coverage detected