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 {
|
if emojiR == nil {
|
||||||
return errors.New("no emoji reaction data")
|
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 {
|
if emojiR.Type == protobuf.EmojiReaction_UNKNOWN_EMOJI_REACTION_TYPE {
|
||||||
return errors.New("emoji reaction type unknown")
|
return errors.New("emoji reaction type unknown")
|
||||||
}
|
}
|
||||||
|
@ -225,6 +228,9 @@ func ValidateReceivedChatMessage(message *protobuf.ChatMessage, whisperTimestamp
|
||||||
if emojiRR == nil {
|
if emojiRR == nil {
|
||||||
return errors.New("no emoji reaction retraction data")
|
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 {
|
if message.ContentType == protobuf.ChatMessage_AUDIO {
|
||||||
|
|
Loading…
Reference in New Issue