aboutsummaryrefslogtreecommitdiff
path: root/internal/chat/chan.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/chat/chan.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/chat/chan.go b/internal/chat/chan.go
index ae78bb6..bc2b70f 100644
--- a/internal/chat/chan.go
+++ b/internal/chat/chan.go
@@ -29,6 +29,12 @@ func (c *Channel) processEvent(ev any) {
slog.Info("channel event", slog.String("channel", c.Name), slog.Any("event", ev))
for u := range c.Users {
+ if ev, ok := ev.(Message); ok {
+ if ev.User == u {
+ // Do not return user message to him
+ continue
+ }
+ }
select {
case u.Events <- ev:
default: