Files
quicproquo/proto/qpc/v1/moderation.proto
Christian Nennemann a710037dde chore: rename quicproquo → quicprochat in Rust workspace
Rename all crate directories, package names, binary names, proto
package/module paths, ALPN strings, env var prefixes, config filenames,
mDNS service names, and plugin ABI symbols from quicproquo/qpq to
quicprochat/qpc.
2026-03-21 19:14:06 +01:00

69 lines
1.3 KiB
Protocol Buffer

syntax = "proto3";
package qpc.v1;
// Moderation service: report, ban, unban, list reports, list banned.
// Method IDs: 420-424.
message ReportMessageRequest {
// Encrypted report payload (asymmetric, admin-key only).
bytes encrypted_report = 1;
// Conversation ID where the reported message lives.
bytes conversation_id = 2;
}
message ReportMessageResponse {
bool accepted = 1;
}
message BanUserRequest {
// Identity key of the user to ban (32 bytes).
bytes identity_key = 1;
// Human-readable reason for the ban.
string reason = 2;
// Ban duration in seconds (0 = permanent).
uint64 duration_secs = 3;
}
message BanUserResponse {
bool success = 1;
}
message UnbanUserRequest {
bytes identity_key = 1;
}
message UnbanUserResponse {
bool success = 1;
}
message ListReportsRequest {
uint32 limit = 1;
uint32 offset = 2;
}
message ReportEntry {
uint64 id = 1;
bytes encrypted_report = 2;
bytes conversation_id = 3;
bytes reporter_identity = 4;
uint64 timestamp = 5;
}
message ListReportsResponse {
repeated ReportEntry reports = 1;
}
message ListBannedRequest {}
message BannedUserEntry {
bytes identity_key = 1;
string reason = 2;
uint64 banned_at = 3;
// 0 = permanent ban.
uint64 expires_at = 4;
}
message ListBannedResponse {
repeated BannedUserEntry users = 1;
}