Skip to content

Commit

Permalink
add event process(close #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simplxss committed Apr 8, 2024
1 parent bd2dd44 commit 7b5331c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 10 deletions.
6 changes: 1 addition & 5 deletions protos/common/message_element.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ message BubbleFaceElement {
}

message ReplyElement {
oneof id {
string message_id = 1; // 回复的消息id
string request_id = 3;
string notice_id = 3;
}
string message_id = 1; // 回复的消息id
}

message ImageElement {
Expand Down
15 changes: 10 additions & 5 deletions protos/message/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ message SendMessageRequest {
kritor.common.Contact contact = 1; // 发送目标
repeated kritor.common.Element elements = 2; // 发的什么东西
optional uint32 retry_count = 3; // 重试次数

// passive_id
optional string message_id = 4;
optional string notice_id = 5;
optional string request_id = 6;
}

message SendMessageResponse {
Expand All @@ -43,14 +48,14 @@ message SendMessageResponse {
}

message SendMessageByResIdRequest {
kritor.common.Contact contact = 1; // 发送目标
string res_id = 2; // 资源ID
optional uint32 retry_count = 3; // 重试次数
kritor.common.Contact contact = 1;
string res_id = 2;
optional uint32 retry_count = 3;
}

message SendMessageByResIdResponse {
string message_id = 1; // 发送成功后的消息ID
uint32 message_time = 2; // 发送时间
string message_id = 1;
uint32 message_time = 2;
}

message SetMessageReadRequest {
Expand Down
40 changes: 40 additions & 0 deletions protos/process/process.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
syntax = "proto3";

package kritor.process;

option csharp_namespace = "Kritor.Process";
option java_multiple_files = true;
option java_package = "io.kritor.process";
option go_package = "grpc/kritor/process";

service ProcessService {
rpc SetFriendApplyResult(SetFriendApplyResultRequest) returns (SetFriendApplyResultResponse);
rpc SetGroupApplyResult(SetGroupApplyResultRequest) returns (SetGroupApplyResultResponse);
rpc SetInvitedJoinGroupResult(SetInvitedJoinGroupResultRequest) returns (SetInvitedJoinGroupResultResponse);
}

message SetFriendApplyResultRequest {
string request_id = 1;
bool is_approve = 2;
optional string remark = 3; // 同意时可选
}

message SetFriendApplyResultResponse {
}

message SetGroupApplyResultRequest {
string request_id = 1;
bool is_approve = 2;
optional string deny_reason = 3; // 拒绝时可选
}

message SetGroupApplyResultResponse {
}

message SetInvitedJoinGroupResultRequest {
string request_id = 1;
bool is_approve = 2;
}

message SetInvitedJoinGroupResultResponse {
}

0 comments on commit 7b5331c

Please sign in to comment.