This commit is contained in:
Andrea Maria Piana 2020-07-28 10:02:51 +02:00
parent 29f25c5486
commit a1a6e1c6c0
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
5 changed files with 7 additions and 6 deletions

View File

@ -272,11 +272,11 @@ func (p *MessageProcessor) EncodeMembershipUpdate(
if chatEntity != nil {
chatEntityProtobuf := chatEntity.GetProtobuf()
switch chatEntityProtobuf.(type) {
switch chatEntityProtobuf := chatEntityProtobuf.(type) {
case *protobuf.ChatMessage:
message.Message = chatEntityProtobuf.(*protobuf.ChatMessage)
message.Message = chatEntityProtobuf
case *protobuf.EmojiReaction:
message.EmojiReaction = chatEntityProtobuf.(*protobuf.EmojiReaction)
message.EmojiReaction = chatEntityProtobuf
}
}

View File

@ -11,8 +11,8 @@ import (
"unicode/utf8"
"github.com/golang/protobuf/proto"
"github.com/status-im/markdown"
"github.com/status-im/status-go/protocol/protobuf"
)

View File

@ -505,6 +505,7 @@ func (db sqlitePersistence) EmojiReactionsByChatID(chatID string, currCursor str
// NOTE: We match against local_chat_id for security reasons.
// As a user could potentially send an emoji reaction for a one to
// one/group chat that has no access to.
// nolint: gosec
query := fmt.Sprintf(`
SELECT
e.clock_value,

View File

@ -3243,7 +3243,7 @@ func (m *Messenger) SendEmojiReaction(ctx context.Context, chatID, messageID str
Clock: clock,
MessageId: messageID,
ChatId: chatID,
Type: protobuf.EmojiReaction_Type(emojiID),
Type: emojiID,
},
LocalChatID: chatID,
From: types.EncodeHex(crypto.FromECDSAPub(&m.identity.PublicKey)),

View File

@ -90,7 +90,7 @@ func (s *MessengerEmojiSuite) TestSendEmoji() {
bob := s.newMessengerWithKey(s.shh, key)
chatID := "status"
chatID := statusChatID
chat := CreatePublicChat(chatID, alice.transport)