3
0
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:
Shivaram Lingamneni 2022-08-08 01:06:19 -04:00
parent 898f84c613
commit 77de026961

View File

@ -2677,7 +2677,7 @@ func reportPersistenceStatus(client *Client, rb *ResponseBuffer, broadcast bool)
rb.Add(nil, client.server.name, "PERSISTENCE", "STATUS", storedSettingStr, effectiveSettingStr)
if broadcast {
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)
}
}