1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix: nil pointer error on guild channel message parser

This commit is contained in:
Mrs4s 2021-12-14 16:37:05 +08:00
parent d55929cf12
commit 5eb78e427c
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -325,6 +325,9 @@ func (s *GuildService) parseGuildChannelMessage(msg *channel.ChannelMsgContent)
if guild == nil {
return nil // todo: sync guild info
}
if msg.Body == nil || msg.Body.RichText == nil {
return nil
}
// mem := guild.FindMember(msg.Head.RoutingHead.GetFromTinyid())
return &message.GuildChannelMessage{
Id: msg.Head.ContentHead.GetSeq(),