You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added EmojiReaction payload types
* I'm an author now
* wordlist update
* Moved MessageType protobuf into dedicated section
With the inclusion of emoji reactions the MessageType protobuf was split out from the ChatMessage protobuf so that the MessageType enums could be used in multiple protobuf message types.
| 6 | chat_id |`string`| The local ID of the chat the message is sent to |
152
146
| 7 | message_type |`MessageType`| The type of message, different for one-to-one, public or group chats |
153
147
| 8 | content_type |`ContentType`| The type of the content of the message |
154
-
| 9 | payload | `Sticker|Image|Audio|nil` | The payload of the message based on the content type |
148
+
| 9 | payload |`Sticker` I `Image` I `Audio` I `nil`| The payload of the message based on the content type |
155
149
156
150
#### Content types
157
151
@@ -235,8 +229,6 @@ message AudioMessage {
235
229
UNKNOWN_AUDIO_TYPE = 0;
236
230
AAC = 1;
237
231
AMR = 2;
238
-
}
239
-
}
240
232
```
241
233
242
234
#### Message types
@@ -251,6 +243,17 @@ The following messages types MUST be supported:
251
243
*`PUBLIC_GROUP` is a private message
252
244
*`PRIVATE_GROUP` is a message to the private group.
253
245
246
+
```protobuf
247
+
enum MessageType {
248
+
UNKNOWN_MESSAGE_TYPE = 0;
249
+
ONE_TO_ONE = 1;
250
+
PUBLIC_GROUP = 2;
251
+
PRIVATE_GROUP = 3;
252
+
// Only local
253
+
SYSTEM_MESSAGE_PRIVATE_GROUP = 4;
254
+
}
255
+
```
256
+
254
257
#### Clock vs Timestamp and message ordering
255
258
256
259
If a user sends a new message before the messages sent while the user was offline are received, the new
@@ -316,6 +319,52 @@ A client SHOULD send a `ContactUpdate` to all the contacts each time:
316
319
317
320
A client SHOULD also periodically send a `ContactUpdate` to all the contacts, the interval is up to the client, the Status official client sends these updates every 48 hours.
318
321
322
+
### EmojiReaction
323
+
324
+
`EmojiReaction`s represents a user's "reaction" to a specific chat message. For more information about the concept of
325
+
emoji reactions see [Facebook Reactions](https://en.wikipedia.org/wiki/Facebook_like_button#Use_on_Facebook).
326
+
327
+
This specification RECOMMENDS that the UI/UX implementation of sending `EmojiReactions` requires only a single click
328
+
operation, as users have an expectation that emoji reactions are effortless and simple to perform.
329
+
330
+
```protobuf
331
+
message EmojiReaction {
332
+
// clock Lamport timestamp of the chat message
333
+
uint64 clock = 1;
334
+
335
+
// 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
336
+
// target message also stores the chat_id
337
+
string chat_id = 2;
338
+
339
+
// message_id the ID of the target message that the user wishes to react to
340
+
string message_id = 3;
341
+
342
+
// message_type is (somewhat confusingly) the ID of the type of chat the message belongs to
343
+
MessageType message_type = 4;
344
+
345
+
// type the ID of the emoji the user wishes to react with
346
+
Type type = 5;
347
+
348
+
enum Type {
349
+
UNKNOWN_EMOJI_REACTION_TYPE = 0;
350
+
LOVE = 1;
351
+
THUMBS_UP = 2;
352
+
THUMBS_DOWN = 3;
353
+
LAUGH = 4;
354
+
SAD = 5;
355
+
ANGRY = 6;
356
+
}
357
+
358
+
// whether this is a retraction of a previously sent emoji
359
+
bool retracted = 6;
360
+
}
361
+
```
362
+
363
+
Clients MUST specify `clock`, `chat_id`, `message_id`, `type` and `message_type`.
364
+
365
+
This specification RECOMMENDS that the UI/UX implementation of retracting an `EmojiReaction`s requires only a single
366
+
click operation, as users have an expectation that emoji reaction removals are effortless and simple to perform.
367
+
319
368
### SyncInstallationContact
320
369
321
370
The node uses `SyncInstallationContact` messages to synchronize in a best-effort the contacts to other devices.
@@ -400,6 +449,12 @@ There are two ways to upgrade the protocol without breaking compatibility:
400
449
401
450
## Changelog
402
451
452
+
### Version 0.5
453
+
454
+
Released [//TODO]()
455
+
456
+
- Added support for emoji reactions
457
+
403
458
### Version 0.4
404
459
405
460
Released [July 16, 2020](https://github.com/status-im/specs/commit/ad45cd5fed3c0f79dfa472253a404f670dd47396)
0 commit comments