🐛 Bug fixes on notifying user

This commit is contained in:
LittleSheep 2024-12-13 21:15:38 +08:00
parent 070cb8e12c
commit 85ff0c501a

View File

@ -170,9 +170,10 @@ func NotifyMessageEvent(members []models.ChannelMember, event models.Event) {
}
}
if len(event.Sender.Nick) == 0 {
user, err := authkit.GetUser(gap.Nx, event.SenderID)
if err == nil {
user, err := authkit.GetUser(gap.Nx, event.SenderID)
if err == nil {
event.Sender.Avatar = user.Avatar
if len(event.Sender.Nick) == 0 {
event.Sender.Nick = user.Nick
}
}