From 21581958c38861f3a62ef7c27d0a8a6f4db2a1f8 Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Tue, 21 Jun 2022 14:03:31 -0700 Subject: Refactor notifyOthers --- hotline/transaction_handlers.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hotline/transaction_handlers.go') diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index 5763967..cad3370 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -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)) -- cgit