| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- syntax = "proto3";
- package chatto.api.v1;
- import "buf/validate/validate.proto";
- import "google/protobuf/timestamp.proto";
- // Custom status shown on a user profile, separate from presence.
- message CustomUserStatus {
- // Short emoji marker displayed with the status.
- string emoji = 1 [(buf.validate.field).string = {
- min_len: 1
- max_len: 16
- }];
- // User-written status text.
- string text = 2 [(buf.validate.field).string = {
- min_len: 1
- max_len: 100
- }];
- // Optional time after which clients should stop showing the status.
- google.protobuf.Timestamp expires_at = 3;
- }
- // Request to replace the current user's complete custom status. Emoji and text
- // are required. Omitted expires_at removes any previous expiry. Use
- // DeleteCustomStatus to clear the status.
- message SetCustomStatusRequest {
- // Short emoji marker displayed with the status.
- string emoji = 1;
- // User-written status text.
- string text = 2;
- // Optional future time after which clients should stop showing the status.
- google.protobuf.Timestamp expires_at = 3;
- }
- // Result of setting the current user's complete custom status.
- message SetCustomStatusResponse {
- // Stored custom status after validation and normalization.
- CustomUserStatus status = 1;
- }
- // Request to delete the current user's custom status.
- message DeleteCustomStatusRequest {}
- // Result of deleting the current user's custom status.
- message DeleteCustomStatusResponse {
- // Current custom status after the operation. Usually absent after a clear.
- CustomUserStatus status = 1;
- }
|