feat: support Lark (larksuite.com) alongside Feishu
Add larkx/region.py with per-region endpoints, gateway app id and locale. The region is chosen at login (lark auth qr/import --region, default LARKX_REGION) and persisted in credentials; every request derives its URLs from it. Credentials saved before this change are treated as Feishu. Fixes found while testing with real Lark and Feishu accounts: - search: locale belongs on the request header, not searchContext - storage: drop inline thumbnail bytes so content_data stays valid JSON - send --root: set parentId, plus isReplyInThread for regular groups; topic-mode groups reject that flag, so chat modes are looked up and cached per chat - topic groups (GROUP + chatMode THREAD/THREAD_V2): root messages anchor their own thread, except system notices; push handling and pull_history share decoders.resolve_scope - show media/audio durations in seconds (they are milliseconds) - render @mentions with the mentioned name via AtProperty - lark send stores the server message id so the WS echo fills in the same row instead of inserting a duplicate proto.proto gains isReplyInThread, AtProperty and PutMessageResponse; proto_pb2.py is regenerated with grpcio-tools 1.71 (protoc 5.29.0).
This commit is contained in:
@ -47,9 +47,13 @@ message PutMessageRequest {
|
||||
optional int32 version = 9;
|
||||
optional bool isThreadGroupTopic = 10;
|
||||
optional bool isAnonymous = 11;
|
||||
optional bool isReplyInThread = 12;
|
||||
repeated string leftStaticResourceKeys = 101;
|
||||
optional bytes thriftMessage = 102;
|
||||
}
|
||||
message PutMessageResponse {
|
||||
optional entities.Message message = 1;
|
||||
}
|
||||
|
||||
|
||||
message PutChatRequest {
|
||||
@ -541,6 +545,10 @@ message TextProperty {
|
||||
optional string i18nKey = 2;
|
||||
optional int32 numberOfLines = 3;
|
||||
}
|
||||
message AtProperty {
|
||||
optional string userId = 1;
|
||||
optional string content = 2;
|
||||
}
|
||||
message ExtendedEntry {
|
||||
optional string key = 1;
|
||||
optional string value = 2;
|
||||
|
||||
Reference in New Issue
Block a user