github.com/status-im/status-go@v1.1.0/protocol/protobuf/membership_update_message.proto (about) 1 syntax = "proto3"; 2 3 option go_package = "./;protobuf"; 4 package protobuf; 5 6 import "chat_message.proto"; 7 import "emoji_reaction.proto"; 8 9 message MembershipUpdateEvent { 10 // Lamport timestamp of the event 11 uint64 clock = 1; 12 // List of public keys of objects of the action 13 repeated string members = 2; 14 // Name of the chat for the CHAT_CREATED/NAME_CHANGED event types 15 string name = 3; 16 // The type of the event 17 EventType type = 4; 18 // Color of the chat for the CHAT_CREATED/COLOR_CHANGED event types 19 string color = 5; 20 // Chat image 21 bytes image = 6; 22 23 enum EventType { 24 UNKNOWN = 0; 25 CHAT_CREATED = 1; 26 NAME_CHANGED = 2; 27 MEMBERS_ADDED = 3; 28 MEMBER_JOINED = 4; 29 MEMBER_REMOVED = 5; 30 ADMINS_ADDED = 6; 31 ADMIN_REMOVED = 7; 32 COLOR_CHANGED = 8; 33 IMAGE_CHANGED = 9; 34 } 35 } 36 37 // MembershipUpdateMessage is a message used to propagate information 38 // about group membership changes. 39 // For more information, see https://github.com/status-im/specs/blob/master/status-group-chats-spec.md. 40 message MembershipUpdateMessage { 41 // The chat id of the private group chat 42 string chat_id = 1; 43 // A list of events for this group chat, first x bytes are the signature, then is a 44 // protobuf encoded MembershipUpdateEvent 45 repeated bytes events = 2; 46 47 // An optional chat message 48 oneof chat_entity { 49 ChatMessage message = 3; 50 EmojiReaction emoji_reaction = 4; 51 } 52 }