MCPcopy Index your code
hub / github.com/tinode/chat / fndRemovePublic

Method fndRemovePublic

server/topic.go:3849–3860  ·  view source on GitHub ↗

Remove per-session value of fnd.Public.

(sess *Session)

Source from the content-addressed store, hash-verified

3847
3848// Remove per-session value of fnd.Public.
3849func (t *Topic) fndRemovePublic(sess *Session) {
3850 if t.public == nil {
3851 return
3852 }
3853 // FIXME: case of a multiplexing session won't work correctly.
3854 // Maybe handle it at the proxy topic.
3855 if pubmap, ok := t.public.(map[string]any); ok {
3856 delete(pubmap, sess.sid)
3857 return
3858 }
3859 panic("Invalid Fnd.Public type")
3860}
3861
3862func (t *Topic) accessFor(authLvl auth.Level) types.AccessMode {
3863 return selectAccessMode(authLvl, t.accessAnon, t.accessAuth, getDefaultAccess(t.cat, true, false))

Callers 1

handleLeaveRequestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected