2020-07-27 10:13:22 +00:00
|
|
|
package common
|
2020-07-25 14:16:00 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/ecdsa"
|
|
|
|
|
2020-07-25 16:13:08 +00:00
|
|
|
"github.com/golang/protobuf/proto"
|
|
|
|
|
2020-07-25 14:16:00 +00:00
|
|
|
"github.com/status-im/status-go/protocol/protobuf"
|
|
|
|
)
|
|
|
|
|
2020-07-29 10:55:33 +00:00
|
|
|
// ChatEntity is anything that is sendable in a chat.
|
|
|
|
// Currently it encompass a Message and EmojiReaction.
|
2020-07-25 14:16:00 +00:00
|
|
|
type ChatEntity interface {
|
2020-07-25 16:13:08 +00:00
|
|
|
proto.Message
|
|
|
|
|
2020-07-25 14:16:00 +00:00
|
|
|
GetChatId() string
|
|
|
|
GetMessageType() protobuf.MessageType
|
|
|
|
GetSigPubKey() *ecdsa.PublicKey
|
2020-07-25 16:13:08 +00:00
|
|
|
GetProtobuf() proto.Message
|
2020-11-18 09:16:51 +00:00
|
|
|
GetGrant() []byte
|
2021-01-15 17:47:30 +00:00
|
|
|
WrapGroupMessage() bool
|
2020-07-25 16:13:08 +00:00
|
|
|
|
|
|
|
SetMessageType(messageType protobuf.MessageType)
|
2020-07-25 14:16:00 +00:00
|
|
|
}
|