user_status.proto 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. syntax = "proto3";
  2. package chatto.api.v1;
  3. import "buf/validate/validate.proto";
  4. import "google/protobuf/timestamp.proto";
  5. // Custom status shown on a user profile, separate from presence.
  6. message CustomUserStatus {
  7. // Short emoji marker displayed with the status.
  8. string emoji = 1 [(buf.validate.field).string = {
  9. min_len: 1
  10. max_len: 16
  11. }];
  12. // User-written status text.
  13. string text = 2 [(buf.validate.field).string = {
  14. min_len: 1
  15. max_len: 100
  16. }];
  17. // Optional time after which clients should stop showing the status.
  18. google.protobuf.Timestamp expires_at = 3;
  19. }
  20. // Request to update or replace the current user's custom status.
  21. message UpdateCustomStatusRequest {
  22. // Short emoji marker displayed with the status.
  23. string emoji = 1;
  24. // User-written status text.
  25. string text = 2;
  26. // Optional future time after which clients should stop showing the status.
  27. google.protobuf.Timestamp expires_at = 3;
  28. }
  29. // Result of updating the current user's custom status.
  30. message UpdateCustomStatusResponse {
  31. // Stored custom status after validation and normalization.
  32. CustomUserStatus status = 1;
  33. }
  34. // Request to delete the current user's custom status.
  35. message DeleteCustomStatusRequest {}
  36. // Result of deleting the current user's custom status.
  37. message DeleteCustomStatusResponse {
  38. // Current custom status after the operation. Usually absent after a clear.
  39. CustomUserStatus status = 1;
  40. }