mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3536 Protocol | Enhancement | MW 0.40.8 (#2250)
This commit is contained in:
parent
2f9ad41aa8
commit
f9fba7c5a8
5 changed files with 28 additions and 11 deletions
|
@ -8312,15 +8312,16 @@ message Rpc {
|
|||
|
||||
message ReadMessages {
|
||||
enum ReadType {
|
||||
messages = 0;
|
||||
replies = 1;
|
||||
Messages = 0;
|
||||
Mentions = 1;
|
||||
}
|
||||
|
||||
message Request {
|
||||
ReadType type = 1;
|
||||
string chatObjectId = 2; // id of the chat object
|
||||
string afterOrderId = 3; // read from this orderId; if empty - read from the beginning of the chat
|
||||
string beforeOrderId = 4; // read til this orderId
|
||||
int64 lastDbTimestamp = 5; // dbTimestamp from the last processed ChatState event(or GetMessages). Used to prevent race conditions
|
||||
string lastStateId = 5; // stateId from the last processed ChatState event(or GetMessages). Used to prevent race conditions
|
||||
}
|
||||
|
||||
message Response {
|
||||
|
@ -8343,8 +8344,14 @@ message Rpc {
|
|||
}
|
||||
|
||||
message Unread {
|
||||
enum ReadType {
|
||||
Messages = 0;
|
||||
Mentions = 1;
|
||||
}
|
||||
|
||||
message Request {
|
||||
string chatObjectId = 2; // id of the chat object
|
||||
ReadType type = 1;
|
||||
string chatObjectId = 2;
|
||||
string afterOrderId = 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,8 @@ message Event {
|
|||
Chat.Add chatAdd = 128;
|
||||
Chat.Update chatUpdate = 129;
|
||||
Chat.UpdateReactions chatUpdateReactions = 130;
|
||||
Chat.UpdateReadStatus chatUpdateReadStatus = 134; // received to update per-message read status (if needed to highlight the unread messages in the UI)
|
||||
Chat.UpdateMessageReadStatus chatUpdateMessageReadStatus = 134; // received to update per-message read status (if needed to highlight the unread messages in the UI)
|
||||
Chat.UpdateMentionReadStatus chatUpdateMentionReadStatus = 135; // received to update per-message mention read status (if needed to highlight the unread mentions in the UI)
|
||||
|
||||
Chat.Delete chatDelete = 131;
|
||||
Chat.UpdateState chatStateUpdate = 133; // in case new unread messages received or chat state changed (e.g. message read on another device)
|
||||
|
@ -136,7 +137,6 @@ message Event {
|
|||
message Delete {
|
||||
string id = 1;
|
||||
repeated string subIds = 2;
|
||||
model.ChatState state = 3; // Chat state. dbState should be persisted after rendered
|
||||
}
|
||||
message Update {
|
||||
string id = 1;
|
||||
|
@ -149,7 +149,12 @@ message Event {
|
|||
repeated string subIds = 3;
|
||||
}
|
||||
|
||||
message UpdateReadStatus {
|
||||
message UpdateMessageReadStatus {
|
||||
repeated string ids = 1;
|
||||
bool isRead = 2;
|
||||
repeated string subIds = 3;
|
||||
}
|
||||
message UpdateMentionReadStatus {
|
||||
repeated string ids = 1;
|
||||
bool isRead = 2;
|
||||
repeated string subIds = 3;
|
||||
|
|
|
@ -65,4 +65,5 @@ message ObjectStoreChecksums {
|
|||
int32 marketplaceForceReindexCounter = 15;
|
||||
int32 reindexDeletedObjects = 16;
|
||||
int32 reindexParticipants = 17;
|
||||
int32 reindexChats = 18;
|
||||
}
|
||||
|
|
|
@ -1394,21 +1394,25 @@ message ChatState {
|
|||
}
|
||||
UnreadState messages = 1; // unread messages
|
||||
UnreadState mentions = 2; // unread mentions
|
||||
int64 dbTimestamp = 3; // reflects the state of the chat db at the moment of sending response/event that includes this state
|
||||
string lastStateId = 3; // reflects the state of the chat db at the moment of sending response/event that includes this state
|
||||
}
|
||||
|
||||
message ChatMessage {
|
||||
string id = 1; // Unique message identifier
|
||||
string orderId = 2; // Used for subscriptions
|
||||
string orderId = 2; // Lexicographical id for message in order of tree traversal
|
||||
string creator = 3; // Identifier for the message creator
|
||||
int64 createdAt = 4;
|
||||
int64 modifiedAt = 9;
|
||||
int64 addedAt = 11; // Message received and added to db at
|
||||
|
||||
// stateId is ever-increasing id (BSON ObjectId) for this message. Unlike orderId, this ID is ordered by the time messages are added. For example, it's useful to prevent accidental reading of messages from the past when a ChatReadMessages request is sent: a message from the past may appear, but the client is still unaware of it
|
||||
string stateId = 11;
|
||||
|
||||
string replyToMessageId = 5; // Identifier for the message being replied to
|
||||
MessageContent message = 6; // Message content
|
||||
repeated Attachment attachments = 7; // Attachments slice
|
||||
Reactions reactions = 8; // Reactions to the message
|
||||
bool read = 10; // Message read status
|
||||
bool mentionRead = 12;
|
||||
message MessageContent {
|
||||
string text = 1; // The text content of the message part
|
||||
Block.Content.Text.Style style = 2; // The style/type of the message part
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue