2020-07-14 00:59:20 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-08-06 16:40:23 +01:00
|
|
|
option go_package = "./;protobuf";
|
2020-07-14 00:59:20 +01:00
|
|
|
package protobuf;
|
|
|
|
|
2020-07-25 12:13:23 +01:00
|
|
|
import "enums.proto";
|
|
|
|
|
2020-07-14 00:59:20 +01:00
|
|
|
message EmojiReaction {
|
2020-07-25 15:16:00 +01:00
|
|
|
// clock Lamport timestamp of the chat message
|
2020-07-14 00:59:20 +01:00
|
|
|
uint64 clock = 1;
|
2020-07-25 15:16:00 +01: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 14:50:37 +01:00
|
|
|
string chat_id = 2;
|
2020-07-25 15:16:00 +01:00
|
|
|
|
|
|
|
// message_id the ID of the target message that the user wishes to react to
|
2020-07-24 14:50:37 +01:00
|
|
|
string message_id = 3;
|
2020-07-25 15:16:00 +01:00
|
|
|
|
|
|
|
// message_type is (somewhat confusingly) the ID of the type of chat the message belongs to
|
2020-07-25 12:13:23 +01:00
|
|
|
MessageType message_type = 4;
|
2020-07-25 15:16:00 +01:00
|
|
|
|
|
|
|
// type the ID of the emoji the user wishes to react with
|
2020-07-25 12:13:23 +01:00
|
|
|
Type type = 5;
|
2020-07-14 00:59:20 +01: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 14:27:48 +02:00
|
|
|
// whether this is a rectraction of a previously sent emoji
|
|
|
|
bool retracted = 6;
|
2020-11-18 10:16:51 +01:00
|
|
|
|
|
|
|
// Grant for organisation chat messages
|
|
|
|
bytes grant = 7;
|
2020-07-14 00:59:20 +01:00
|
|
|
}
|