-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdates.proto
More file actions
187 lines (156 loc) · 5.3 KB
/
updates.proto
File metadata and controls
187 lines (156 loc) · 5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
syntax = "proto3";
package tangle.client.updates;
import "types.proto";
import "refs.proto";
import "chats.proto";
import "voice.proto";
import "reactions.proto";
message Update {
oneof update {
UpdateMessageCreated message_created = 1;
UpdateChannel channel = 2;
UpdateMessageDeleted message_deleted = 3;
UpdateUserStatus user_status = 4;
UpdateUser user = 5;
UpdateCommunity community = 6;
UpdateChannelDeleted channel_deleted = 7;
UpdateMessage message = 8;
UpdateChatTyping chat_typing = 9;
UpdateCommunityMember community_member = 10;
UpdateCommunityDeleted community_deleted = 11;
UpdateConversationPermissions conversation_permissions = 12;
UpdateChat chat = 13;
UpdateSessionDeleted session_deleted = 14;
UpdateCommunityUnavailable community_unavailable = 15;
UpdateMemberList member_list = 16;
UpdateCommunityMemberDeleted community_member_deleted = 17;
UpdateUserRelationship update_user_relationship = 18;
UpdateUserRelationshipDeleted update_user_relationship_deleted = 19;
UpdateGroup group = 20;
voice.UpdateRoomState room_state = 21;
voice.UpdateRoomParticipant room_participant = 22;
UpdateMessageReactions message_reactions = 23;
UpdateConversationLastRead conversation_last_read = 24;
UpdateCommunityMemberCreated community_member_created = 25;
}
}
message UpdateMessageCreated {
tangle.client.types.Message message = 1;
uint32 channel_unread_count = 2;
// The author of the message. Mostly used in communities. Do not assume this
// is always present.
optional tangle.client.types.User author = 3;
}
message UpdateMessage { tangle.client.types.Message message = 1; }
message UpdateChannel { tangle.client.types.Channel channel = 1; }
message UpdateChannelDeleted { refs.ChannelRef channel = 1; }
message UpdateMessageDeleted {
refs.ChatRef chat_ref = 1;
// @snowflake<Message>
repeated fixed64 message_ids = 2;
}
message UpdateUserStatus {
// @snowflake<User>
fixed64 user_id = 1;
tangle.client.types.UserStatus status = 2;
}
message UpdateUser {
// @snowflake<User>
fixed64 user_id = 1;
tangle.client.types.User user = 2;
}
message UpdateCommunity {
// @snowflake<Community>
fixed64 community_id = 1;
tangle.client.types.Community community = 2;
}
message UpdateCommunityDeleted {
// @snowflake<Community>
fixed64 community_id = 1;
}
message UpdateChatTyping {
refs.ChatRef chat_ref = 1;
// @snowflake<User>
fixed64 user_id = 2;
bool typing = 3;
}
message UpdateCommunityMember {
// @snowflake<Community>
fixed64 community_id = 1;
// @snowflake<User>
fixed64 member_id = 2;
tangle.client.types.CommunityMember member = 3;
}
message UpdateCommunityMemberDeleted {
// @snowflake<Community>
fixed64 community_id = 1;
// @snowflake<User>
fixed64 member_id = 2;
}
message UpdateCommunityMemberCreated {
// @snowflake<Community>
fixed64 community_id = 1;
// @snowflake<User>
fixed64 member_id = 2;
optional tangle.client.types.CommunityMember member = 3;
optional tangle.client.types.User user = 4;
}
message UpdateConversationPermissions {
refs.ChatRef chat_ref = 1;
types.PermissionOverrides permissions = 2;
}
message UpdateChat { chats.Chat chat = 1; }
message UpdateSessionDeleted {
// @snowflake<Session>
fixed64 session_id = 1;
}
message UpdateCommunityUnavailable {
// @snowflake<Community>
fixed64 community_id = 1;
}
message UpdateMemberList {
// @snowflake<Community>
optional fixed64 community_id = 1;
// @snowflake<Channel>
fixed64 channel_id = 2;
// repeated fixed64 member_ids = 3;
reserved 3;
repeated MemberListEntry entries = 4;
}
message MemberListEntry {
oneof entry {
MemberListEntryUser user = 1;
MemberListEntryDivider divider = 2;
}
}
message MemberListEntryUser {
types.User user = 1;
optional string nickname = 2;
}
message MemberListEntryDivider {
oneof inner {
bool online = 1;
// @snowflake<Role>
fixed64 role_id = 2;
}
uint32 member_count = 3;
}
message UpdateUserRelationship { types.Relationship relationship = 1; }
message UpdateUserRelationshipDeleted {
// @snowflake<User>
fixed64 other_user_id = 1;
}
message UpdateGroup {
types.Group group = 1;
repeated types.User users = 2;
}
message UpdateMessageReactions {
refs.ChatRef chat_ref = 1;
reactions.MessageReactions reactions = 2;
}
message UpdateConversationLastRead {
refs.ChatRef chat_ref = 1;
// @snowflake<Message>
fixed64 last_read_message_id = 2;
optional uint32 unread_count = 3;
}