From 49bccda5eecfaccf8102c9fc8c0cd4e896b987e5 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Wed, 3 Jun 2020 21:09:24 +0200 Subject: [PATCH] Send client notification to oneself too. This was broken when we pushed user notifications into addClient. --- group.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/group.go b/group.go index 6231b4b..31dcba5 100644 --- a/group.go +++ b/group.go @@ -237,6 +237,7 @@ func addClient(name string, c client, user, pass string) (*group, error) { g.clients[c.getId()] = c go func(clients []client) { + c.pushClient(c.getId(), c.getUsername(), true) for _, cc := range clients { err := c.pushClient(cc.getId(), cc.getUsername(), true) if err == ErrClientDead { @@ -264,7 +265,7 @@ func delClient(c client) { for _, cc := range clients { cc.pushClient(c.getId(), c.getUsername(), false) } - }(g.getClientsUnlocked(c)) + }(g.getClientsUnlocked(nil)) } func (g *group) getClients(except client) []client {