2020-07-13 23:59:20 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-08-06 15:40:23 +00:00
|
|
|
option go_package = "./;protobuf";
|
2020-07-13 23:59:20 +00:00
|
|
|
package protobuf;
|
|
|
|
|
2020-07-25 11:13:23 +00:00
|
|
|
import "enums.proto";
|
|
|
|
|
2020-07-13 23:59:20 +00:00
|
|
|
message EmojiReaction {
|
2020-07-25 14:16:00 +00:00
|
|
|
// clock Lamport timestamp of the chat message
|
2020-07-13 23:59:20 +00:00
|
|
|
uint64 clock = 1;
|
2020-07-25 14:16:00 +00:00
|
|
|
|
|
|
|
// chat_id the ID of the chat the message belongs to, for query efficiency the chat_id is stored in the db even though the
|
|
|
|
// target message also stores the chat_id
|
2020-07-24 13:50:37 +00:00
|
|
|
string chat_id = 2;
|
2020-07-25 14:16:00 +00:00
|
|
|
|
|
|
|
// message_id the ID of the target message that the user wishes to react to
|
2020-07-24 13:50:37 +00:00
|
|
|
string message_id = 3;
|
2020-07-25 14:16:00 +00:00
|
|
|
|
|
|
|
// message_type is (somewhat confusingly) the ID of the type of chat the message belongs to
|
2020-07-25 11:13:23 +00:00
|
|
|
MessageType message_type = 4;
|
2020-07-25 14:16:00 +00:00
|
|
|
|
|
|
|
// type the ID of the emoji the user wishes to react with
|
2020-07-25 11:13:23 +00:00
|
|
|
Type type = 5;
|
2020-07-13 23:59:20 +00:00
|
|
|
|
|
|
|
enum Type {
|
|
|
|
UNKNOWN_EMOJI_REACTION_TYPE = 0;
|
|
|
|
LOVE = 1;
|
|
|
|
THUMBS_UP = 2;
|
|
|
|
THUMBS_DOWN = 3;
|
|
|
|
LAUGH = 4;
|
|
|
|
SAD = 5;
|
|
|
|
ANGRY = 6;
|
|
|
|
}
|
|
|
|
|
2020-07-27 12:27:48 +00:00
|
|
|
// whether this is a rectraction of a previously sent emoji
|
|
|
|
bool retracted = 6;
|
2020-11-18 09:16:51 +00:00
|
|
|
|
|
|
|
// Grant for organisation chat messages
|
2024-02-11 12:11:04 +00:00
|
|
|
bytes grant = 7 [deprecated = true];
|
2020-07-13 23:59:20 +00:00
|
|
|
}
|