From e742b7d9b5b0367dfd478ba45d3a835cb75d244c Mon Sep 17 00:00:00 2001 From: Cnly Date: Tue, 25 Jun 2019 22:53:07 +0800 Subject: [PATCH] Add warning for OnNewEvent when no user to wake up Signed-off-by: Alex Chen --- syncapi/sync/notifier.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syncapi/sync/notifier.go b/syncapi/sync/notifier.go index 48527555b..0bc90dbae 100644 --- a/syncapi/sync/notifier.go +++ b/syncapi/sync/notifier.go @@ -104,6 +104,8 @@ func (n *Notifier) OnNewEvent(ev *gomatrixserverlib.Event, roomID string, userID n.wakeupUsers(n.joinedUsers(roomID), pos) } else if len(userIDs) > 0 { n.wakeupUsers(userIDs, pos) + } else { + log.Warn("WARNING: Notifier.OnNewEvent called but caller supplied no user to wake up") } }