Add chat mute rpc endpoint

This commit is contained in:
2025-06-21 03:36:33 -04:00
parent a8135fd45c
commit ef23f7d07e
2 changed files with 15 additions and 0 deletions

View File

@@ -4,8 +4,11 @@ option go_package = "git.itzana.me/strafesnet/go-grpc/moderation";
package moderation; package moderation;
import "google/protobuf/struct.proto";
service ModerationService { service ModerationService {
rpc SetState(SetStateRequest) returns (Null); rpc SetState(SetStateRequest) returns (Null);
rpc SetMuted(SetMuteRequest) returns (Null);
} }
message Null {} message Null {}
@@ -16,3 +19,13 @@ message SetStateRequest {
int32 ReasonID = 3; int32 ReasonID = 3;
int32 StateID = 4; int32 StateID = 4;
} }
message SetMuteRequest {
int64 UserID = 1;
int64 ModeratorID = 2;
bool Muted = 3;
optional int64 Duration = 4;
optional int32 ReasonID = 5;
optional string ReasonText = 6;
optional google.protobuf.Struct Metadata = 7;
}

View File

@@ -25,12 +25,14 @@ message UserResponse {
int64 ID = 1; int64 ID = 1;
string Username = 2; string Username = 2;
int32 StateID = 3; int32 StateID = 3;
bool Muted = 4;
} }
message UserRequest { message UserRequest {
int64 ID = 1; int64 ID = 1;
optional string Username = 2; optional string Username = 2;
optional int32 StateID = 3; optional int32 StateID = 3;
optional bool Muted = 4;
} }
message UserFilter { message UserFilter {