From a3557d5183aac0e8a6f9a436d9bd823101c61f44 Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 23 Apr 2024 23:35:23 +0200 Subject: [PATCH] Add RedisRouter.Publish method to store and publish messages --- server/router.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/router.go b/server/router.go index 8be5ce3..73c286e 100644 --- a/server/router.go +++ b/server/router.go @@ -110,6 +110,7 @@ func (r *RedisRouter) storeMessage(msg *meowlib.ToServerMessage) (*meowlib.FromS return nil, err } r.Client.ZAdd(usrmsg.Destination, redis.Z{Score: float64(time.Now().Unix()), Member: out}) + r.Client.Publish(usrmsg.Destination, "!") } from_server.UuidAck = msg.Uuid return &from_server, nil