1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

GO-4727 Merge branch 'main' of github.com:anyproto/anytype-heart into go-4727-local-counters-for-chat

This commit is contained in:
Sergey 2025-03-10 11:04:11 +01:00
commit 7fd5cf8716
No known key found for this signature in database
GPG key ID: 3B6BEF79160221C6
33 changed files with 4586 additions and 2670 deletions

View file

@ -7951,6 +7951,7 @@ message Rpc {
message Request {
string chatObjectId = 1; // Identifier for the chat
int32 limit = 2; // Number of max last messages to return and subscribe
string subId = 3;
}
message Response {
@ -7975,6 +7976,7 @@ message Rpc {
message Unsubscribe {
message Request {
string chatObjectId = 1; // Identifier for the chat
string subId = 2;
}
message Response {
Error error = 1;
@ -7993,6 +7995,27 @@ message Rpc {
}
}
message SubscribeToMessagePreviews {
message Request {}
message Response {
Error error = 1;
string subId = 2;
message Error {
Code code = 1;
string description = 2;
enum Code {
NULL = 0;
UNKNOWN_ERROR = 1;
BAD_INPUT = 2;
// ...
}
}
}
}
message Read {
enum ReadType {
messages = 0;

View file

@ -126,20 +126,26 @@ message Event {
message Chat {
message Add {
string id = 1;
string orderId = 2; // orderId of the message, used for sorting
string orderId = 2;
string afterOrderId = 6;
model.ChatMessage message = 3;
repeated string subIds = 4;
repeated google.protobuf.Struct dependencies = 5;
}
message Delete {
string id = 1;
model.ChatState state = 2; // Chat state. dbState should be persisted after rendered
repeated string subIds = 2;
model.ChatState state = 3; // Chat state. dbState should be persisted after rendered
}
message Update {
string id = 1;
model.ChatMessage message = 2;
repeated string subIds = 3;
}
message UpdateReactions {
string id = 1;
model.ChatMessage.Reactions reactions = 2;
repeated string subIds = 3;
}
message UpdateReadStatus {

View file

@ -395,5 +395,6 @@ service ClientCommands {
rpc ChatSubscribeLastMessages (anytype.Rpc.Chat.SubscribeLastMessages.Request) returns (anytype.Rpc.Chat.SubscribeLastMessages.Response);
rpc ChatUnsubscribe (anytype.Rpc.Chat.Unsubscribe.Request) returns (anytype.Rpc.Chat.Unsubscribe.Response);
rpc ChatReadMessages (anytype.Rpc.Chat.Read.Request) returns (anytype.Rpc.Chat.Read.Response);
rpc ChatSubscribeToMessagePreviews (anytype.Rpc.Chat.SubscribeToMessagePreviews.Request) returns (anytype.Rpc.Chat.SubscribeToMessagePreviews.Response);
rpc ObjectChatAdd (anytype.Rpc.Object.ChatAdd.Request) returns (anytype.Rpc.Object.ChatAdd.Response);
}