Add warning for OnNewEvent when no user to wake up

Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Cnly 2019-06-25 22:53:07 +08:00
parent ba35a0a96d
commit e742b7d9b5

View file

@ -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")
}
}