Complete reference for real-time update Protocol Buffer messages.
Updates are real-time events pushed to clients when changes occur.
Update
Wrapper for all update types.
One of the update types listed below
UpdateMessageCreated
Sent when a new message is created.
Updated unread count for the channel
Message author (optional, mostly for communities)
UpdateMessage
Sent when a message is edited.
UpdateChannel
Sent when a channel is created or updated.
UpdateChannelDeleted
Sent when a channel is deleted.
Reference to the deleted channel
UpdateMessageDeleted
Sent when message(s) are deleted.
Snowflake IDs of deleted messages
UpdateUserStatus
Sent when a user’s status changes.
UpdateUser
Sent when a user’s profile is updated.
Sent when a community is created or updated.
Snowflake ID of the community
Sent when a community is deleted.
Snowflake ID of the deleted community
UpdateChatTyping
Sent when a user starts or stops typing.
Snowflake ID of the typing user
Whether the user is typing
Sent when a community member is updated.
Snowflake ID of the community
Snowflake ID of the member
Sent when a member leaves or is removed from a community.
Snowflake ID of the community
Snowflake ID of the removed member
Sent when a new member joins a community.
Snowflake ID of the community
Snowflake ID of the new member
UpdateConversationPermissions
Sent when conversation permissions change.
permissions
types.PermissionOverrides
Updated permissions
UpdateChat
Sent when a chat is created or updated.
UpdateSessionDeleted
Sent when a session is terminated.
Snowflake ID of the deleted session
Sent when a community becomes unavailable.
Snowflake ID of the unavailable community
UpdateMemberList
Sent when a channel’s member list changes.
Snowflake ID of the community (optional)
Snowflake ID of the channel
MemberListEntry
One of: user (MemberListEntryUser) or divider (MemberListEntryDivider)
MemberListEntryUser
User’s nickname in the community (optional)
MemberListEntryDivider
One of: online (bool) or role_id (fixed64)
Number of members in this section
UpdateUserRelationship
Sent when a user relationship changes.
Updated relationship object
UpdateUserRelationshipDeleted
Sent when a relationship is removed.
Snowflake ID of the other user
UpdateGroup
Sent when a group is created or updated.
Array of users in the group
UpdateRoomState
Sent when voice room state changes.
UpdateRoomParticipant
Sent when a voice room participant changes.
Snowflake ID of the participant
Whether the participant is muted
Whether the participant is deafened
UpdateMessageReactions
Sent when message reactions change.
reactions
reactions.MessageReactions
Updated reactions
UpdateConversationLastRead
Sent when the last read message in a conversation changes.
Snowflake ID of the last read message
Updated unread count (optional)
Protocol Definition
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;
}