use messages buffor in channels

This commit is contained in:
cos
2026-05-06 23:07:52 +02:00
parent 368e6924fe
commit d735c17b8d
+2 -1
View File
@@ -301,13 +301,14 @@ func HandleHubMessage(response http.ResponseWriter, request *http.Request) {
Receiver: channel.Id, Receiver: channel.Id,
CreatedAt: time.Now(), CreatedAt: time.Now(),
} }
channel.AddMessageToBuff(msg)
for permId, perm := range perms { for permId, perm := range perms {
if !perm.CanReadHistory() { if !perm.CanReadHistory() {
continue continue
} }
target, err := cache.GetUserById(permId) target, err = cache.GetUserById(permId)
if err != nil { if err != nil {
continue continue
} }