Fix bug with tracking & merge community changes
This commit is contained in:
parent
824bb17ba9
commit
a182f3e699
|
@ -275,7 +275,9 @@ func (s *MessageSender) sendCommunity(
|
|||
return nil, err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
wrappedMessage, err := s.wrapMessageV1(rawMessage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -321,7 +323,6 @@ func (s *MessageSender) sendCommunity(
|
|||
s.logger.Debug("sent community message ", zap.String("messageID", messageID.String()), zap.String("hash", types.EncodeHex(hash)))
|
||||
}
|
||||
|
||||
}
|
||||
s.transport.Track(messageIDs, hash, newMessage)
|
||||
return messageID, nil
|
||||
}
|
||||
|
|
|
@ -255,10 +255,8 @@ func (r *MessengerResponse) Merge(response *MessengerResponse) error {
|
|||
len(response.Bookmarks)+
|
||||
len(response.clearedHistories)+
|
||||
len(response.VerificationRequests)+
|
||||
len(response.trustStatus)+
|
||||
len(response.DiscordChannels)+
|
||||
len(response.DiscordCategories)+
|
||||
len(response.CommunityChanges) != 0 {
|
||||
len(response.DiscordCategories) != 0 {
|
||||
return ErrNotImplemented
|
||||
}
|
||||
|
||||
|
@ -272,6 +270,7 @@ func (r *MessengerResponse) Merge(response *MessengerResponse) error {
|
|||
r.AddVerificationRequests(response.VerificationRequests)
|
||||
r.AddTrustStatuses(response.trustStatus)
|
||||
r.AddActivityCenterNotifications(response.ActivityCenterNotifications())
|
||||
r.CommunityChanges = append(r.CommunityChanges, response.CommunityChanges...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue