mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +01:00
persistence broadcast needs a cap check
This commit is contained in:
parent
898f84c613
commit
77de026961
@ -2677,7 +2677,7 @@ func reportPersistenceStatus(client *Client, rb *ResponseBuffer, broadcast bool)
|
|||||||
rb.Add(nil, client.server.name, "PERSISTENCE", "STATUS", storedSettingStr, effectiveSettingStr)
|
rb.Add(nil, client.server.name, "PERSISTENCE", "STATUS", storedSettingStr, effectiveSettingStr)
|
||||||
if broadcast {
|
if broadcast {
|
||||||
for _, session := range client.Sessions() {
|
for _, session := range client.Sessions() {
|
||||||
if session != rb.session {
|
if session != rb.session && session.capabilities.Has(caps.Persistence) {
|
||||||
session.Send(nil, client.server.name, "PERSISTENCE", "STATUS", storedSettingStr, effectiveSettingStr)
|
session.Send(nil, client.server.name, "PERSISTENCE", "STATUS", storedSettingStr, effectiveSettingStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user