Skip to content

Commit f5150c0

Browse files
feat: add standard appdata message for overrides
1 parent 4b6531f commit f5150c0

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

stable/profile/v1/appdata.proto

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
syntax = "proto3";
2+
3+
package protocol.profile.v1;
4+
5+
import "harmonytypes/v1/types.proto";
6+
7+
// A tag for an override. This is used as a
8+
// standard shorthand for sending a message with
9+
// an override. If a message starts with before and
10+
// ends with after, clients should send a message
11+
// with the override the tag belongs to, stripping
12+
// the tag indicators.
13+
message OverrideTag {
14+
// The portion of the tag before the messge.
15+
string before = 1;
16+
// The portion of the tag after the messge.
17+
string after = 2;
18+
}
19+
20+
// An individual override
21+
message ProfileOverride {
22+
// The username for this override
23+
optional string username = 1;
24+
// The avatar for this override
25+
optional string avatar = 2;
26+
// The tags for this override.
27+
repeated OverrideTag tags = 3;
28+
// The reason this override is used
29+
oneof reason {
30+
// a custom reason in case the builtin ones don't fit
31+
string user_defined = 4;
32+
// plurality, not system as in computer
33+
harmonytypes.v1.Empty system_plurality = 5;
34+
}
35+
}
36+
37+
// The message used for the 'h.overrides' key
38+
// of appdata.
39+
message AppDataOverrides {
40+
// The list of overrides.
41+
repeated ProfileOverride overrides = 1;
42+
}

0 commit comments

Comments
 (0)