metadata-2 (#2273)
Some checks failed
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled

Initial implementation of draft/metadata-2
This commit is contained in:
thatcher-gaming 2025-06-15 09:06:45 +01:00 committed by GitHub
parent 0f5603eca2
commit 4dcbc48159
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 660 additions and 3 deletions

View file

@ -131,6 +131,7 @@ type Client struct {
clearablePushMessages map[string]time.Time
pushSubscriptionsExist atomic.Uint32 // this is a cache on len(pushSubscriptions) != 0
pushQueue pushQueue
metadata map[string]string
}
type saslStatus struct {
@ -214,6 +215,8 @@ type Session struct {
batch MultilineBatch
webPushEndpoint string // goroutine-local: web push endpoint registered by the current session
metadataSubscriptions utils.HashSet[string]
}
// MultilineBatch tracks the state of a client-to-server multiline batch.
@ -1129,6 +1132,7 @@ func (client *Client) SetNick(nick, nickCasefolded, skeleton string) (success bo
client.nickCasefolded = nickCasefolded
client.skeleton = skeleton
client.updateNickMaskNoMutex()
return true
}