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:
parent
d55929cf12
commit
5eb78e427c
@ -325,6 +325,9 @@ func (s *GuildService) parseGuildChannelMessage(msg *channel.ChannelMsgContent)
|
|||||||
if guild == nil {
|
if guild == nil {
|
||||||
return nil // todo: sync guild info
|
return nil // todo: sync guild info
|
||||||
}
|
}
|
||||||
|
if msg.Body == nil || msg.Body.RichText == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
// mem := guild.FindMember(msg.Head.RoutingHead.GetFromTinyid())
|
// mem := guild.FindMember(msg.Head.RoutingHead.GetFromTinyid())
|
||||||
return &message.GuildChannelMessage{
|
return &message.GuildChannelMessage{
|
||||||
Id: msg.Head.ContentHead.GetSeq(),
|
Id: msg.Head.ContentHead.GetSeq(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user