Added message validator tests for emoji reactions
This commit is contained in:
parent
a0e7e0751c
commit
073ff0b6af
|
@ -213,6 +213,9 @@ func ValidateReceivedChatMessage(message *protobuf.ChatMessage, whisperTimestamp
|
|||
if emojiR == nil {
|
||||
return errors.New("no emoji reaction data")
|
||||
}
|
||||
if len(emojiR.MessageId) == 0 {
|
||||
return errors.New("emoji reaction no target message id")
|
||||
}
|
||||
if emojiR.Type == protobuf.EmojiReaction_UNKNOWN_EMOJI_REACTION_TYPE {
|
||||
return errors.New("emoji reaction type unknown")
|
||||
}
|
||||
|
@ -225,6 +228,9 @@ func ValidateReceivedChatMessage(message *protobuf.ChatMessage, whisperTimestamp
|
|||
if emojiRR == nil {
|
||||
return errors.New("no emoji reaction retraction data")
|
||||
}
|
||||
if len(emojiRR.EmojiReactionId) == 0 {
|
||||
return errors.New("emoji reaction retraction no target emoji reaction id")
|
||||
}
|
||||
}
|
||||
|
||||
if message.ContentType == protobuf.ChatMessage_AUDIO {
|
||||
|
|
Loading…
Reference in New Issue