Fix delayed message sending from authenticated users, closes #679

This commit is contained in:
binwiederhier 2023-03-22 15:30:20 -04:00
parent b8836d674a
commit 502d0a0abd
3 changed files with 52 additions and 9 deletions

View file

@ -1541,7 +1541,7 @@ func (s *Server) sendDelayedMessages() error {
for _, m := range messages {
var u *user.User
if s.userManager != nil && m.User != "" {
u, err = s.userManager.User(m.User)
u, err = s.userManager.UserByID(m.User)
if err != nil {
log.With(m).Err(err).Warn("Error sending delayed message")
continue