]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers.go
Refactor notifyOthers
[rbdr/mobius] / hotline / transaction_handlers.go
index 57639674c445695cfd6c4b9f0ab83a73c78c9c99..cad33700d26d52730342534d01170da9c98b342a 100644 (file)
@@ -964,7 +964,7 @@ func HandleTranAgreed(cc *ClientConn, t *Transaction) (res []Transaction, err er
                cc.AutoReply = []byte{}
        }
 
-       cc.notifyOthers(
+       for _, t := range cc.notifyOthers(
                *NewTransaction(
                        tranNotifyChangeUser, nil,
                        NewField(fieldUserName, cc.UserName),
@@ -972,7 +972,9 @@ func HandleTranAgreed(cc *ClientConn, t *Transaction) (res []Transaction, err er
                        NewField(fieldUserIconID, *cc.Icon),
                        NewField(fieldUserFlags, *cc.Flags),
                ),
-       )
+       ) {
+               cc.Server.outbox <- t
+       }
 
        res = append(res, cc.NewReply(t))