diff --git a/protocol/communities/community.go b/protocol/communities/community.go index 7928be58625..f3f15688e75 100644 --- a/protocol/communities/community.go +++ b/protocol/communities/community.go @@ -60,6 +60,10 @@ func New(config Config) (*Community, error) { return community, nil } +type CommunityAdminSettings struct { + PinMessageAllMembersEnabled bool `json:"pinMessageAllMembersEnabled"` +} + type CommunityChat struct { ID string `json:"id"` Name string `json:"name"` @@ -84,17 +88,18 @@ func (o *Community) MarshalPublicAPIJSON() ([]byte, error) { return nil, errors.New("member identity not set") } communityItem := struct { - ID types.HexBytes `json:"id"` - Verified bool `json:"verified"` - Chats map[string]CommunityChat `json:"chats"` - Categories map[string]CommunityCategory `json:"categories"` - Name string `json:"name"` - Description string `json:"description"` - Images map[string]images.IdentityImage `json:"images"` - Color string `json:"color"` - MembersCount int `json:"membersCount"` - EnsName string `json:"ensName"` - Link string `json:"link"` + ID types.HexBytes `json:"id"` + Verified bool `json:"verified"` + Chats map[string]CommunityChat `json:"chats"` + Categories map[string]CommunityCategory `json:"categories"` + Name string `json:"name"` + Description string `json:"description"` + Images map[string]images.IdentityImage `json:"images"` + Color string `json:"color"` + MembersCount int `json:"membersCount"` + EnsName string `json:"ensName"` + Link string `json:"link"` + CommunityAdminSettings CommunityAdminSettings `json:"adminSettings"` }{ ID: o.ID(), Verified: o.config.Verified, @@ -144,6 +149,13 @@ func (o *Community) MarshalPublicAPIJSON() ([]byte, error) { } } + communityItem.CommunityAdminSettings = CommunityAdminSettings{ + PinMessageAllMembersEnabled: false, + } + + if o.config.CommunityDescription.AdminSettings != nil { + communityItem.CommunityAdminSettings.PinMessageAllMembersEnabled = o.config.CommunityDescription.AdminSettings.PinMessageAllMembersEnabled + } } return json.Marshal(communityItem) } @@ -153,25 +165,26 @@ func (o *Community) MarshalJSON() ([]byte, error) { return nil, errors.New("member identity not set") } communityItem := struct { - ID types.HexBytes `json:"id"` - Admin bool `json:"admin"` - Verified bool `json:"verified"` - Joined bool `json:"joined"` - RequestedAccessAt int `json:"requestedAccessAt"` - Name string `json:"name"` - Description string `json:"description"` - Chats map[string]CommunityChat `json:"chats"` - Categories map[string]CommunityCategory `json:"categories"` - Images map[string]images.IdentityImage `json:"images"` - Permissions *protobuf.CommunityPermissions `json:"permissions"` - Members map[string]*protobuf.CommunityMember `json:"members"` - CanRequestAccess bool `json:"canRequestAccess"` - CanManageUsers bool `json:"canManageUsers"` - CanJoin bool `json:"canJoin"` - Color string `json:"color"` - RequestedToJoinAt uint64 `json:"requestedToJoinAt,omitempty"` - IsMember bool `json:"isMember"` - Muted bool `json:"muted"` + ID types.HexBytes `json:"id"` + Admin bool `json:"admin"` + Verified bool `json:"verified"` + Joined bool `json:"joined"` + RequestedAccessAt int `json:"requestedAccessAt"` + Name string `json:"name"` + Description string `json:"description"` + Chats map[string]CommunityChat `json:"chats"` + Categories map[string]CommunityCategory `json:"categories"` + Images map[string]images.IdentityImage `json:"images"` + Permissions *protobuf.CommunityPermissions `json:"permissions"` + Members map[string]*protobuf.CommunityMember `json:"members"` + CanRequestAccess bool `json:"canRequestAccess"` + CanManageUsers bool `json:"canManageUsers"` + CanJoin bool `json:"canJoin"` + Color string `json:"color"` + RequestedToJoinAt uint64 `json:"requestedToJoinAt,omitempty"` + IsMember bool `json:"isMember"` + Muted bool `json:"muted"` + CommunityAdminSettings CommunityAdminSettings `json:"adminSettings"` }{ ID: o.ID(), Admin: o.IsAdmin(), @@ -229,6 +242,13 @@ func (o *Community) MarshalJSON() ([]byte, error) { } } + communityItem.CommunityAdminSettings = CommunityAdminSettings{ + PinMessageAllMembersEnabled: false, + } + + if o.config.CommunityDescription.AdminSettings != nil { + communityItem.CommunityAdminSettings.PinMessageAllMembersEnabled = o.config.CommunityDescription.AdminSettings.PinMessageAllMembersEnabled + } } return json.Marshal(communityItem) } @@ -664,6 +684,10 @@ func (o *Community) Edit(description *protobuf.CommunityDescription) { o.config.CommunityDescription.Identity.Color = description.Identity.Color o.config.CommunityDescription.Identity.Emoji = description.Identity.Emoji o.config.CommunityDescription.Identity.Images = description.Identity.Images + if o.config.CommunityDescription.AdminSettings == nil { + o.config.CommunityDescription.AdminSettings = &protobuf.CommunityAdminSettings{} + } + o.config.CommunityDescription.AdminSettings.PinMessageAllMembersEnabled = description.AdminSettings.PinMessageAllMembersEnabled o.increaseClock() } @@ -1297,6 +1321,10 @@ func (o *Community) ChatIDs() (chatIDs []string) { return chatIDs } +func (o *Community) AllowsAllMembersToPinMessage() bool { + return o.config.CommunityDescription.AdminSettings != nil && o.config.CommunityDescription.AdminSettings.PinMessageAllMembersEnabled +} + func emptyCommunityChanges() *CommunityChanges { return &CommunityChanges{ MembersAdded: make(map[string]*protobuf.CommunityMember), diff --git a/protocol/messenger_handler.go b/protocol/messenger_handler.go index d68658c9761..38d495aeaf1 100644 --- a/protocol/messenger_handler.go +++ b/protocol/messenger_handler.go @@ -1369,17 +1369,29 @@ func (m *Messenger) matchChatEntity(chatEntity common.ChatEntity) (*Chat, error) } var emojiReaction bool + var pinMessage bool // We allow emoji reactions from anyone switch chatEntity.(type) { case *EmojiReaction: emojiReaction = true + case *common.PinMessage: + pinMessage = true } canPost, err := m.communitiesManager.CanPost(chatEntity.GetSigPubKey(), chat.CommunityID, chat.CommunityChatID(), chatEntity.GetGrant()) if err != nil { return nil, err } - if !emojiReaction && !canPost { + + community, err := m.communitiesManager.GetByIDString(chat.CommunityID) + if err != nil { + return nil, err + } + + isMemberAdmin := community.IsMemberAdmin(chatEntity.GetSigPubKey()) + pinMessageAllowed := community.AllowsAllMembersToPinMessage() + + if (pinMessage && !isMemberAdmin && !pinMessageAllowed) || (!emojiReaction && !canPost) { return nil, errors.New("user can't post") } diff --git a/protocol/messenger_pin_messages.go b/protocol/messenger_pin_messages.go index aac9406ea62..da43f099d5d 100644 --- a/protocol/messenger_pin_messages.go +++ b/protocol/messenger_pin_messages.go @@ -30,6 +30,19 @@ func (m *Messenger) sendPinMessage(ctx context.Context, message *common.PinMessa return nil, errors.New("chat not found") } + if chat.CommunityChat() { + community, err := m.communitiesManager.GetByIDString(chat.CommunityID) + if err != nil { + return nil, err + } + isMemberAdmin := community.IsMemberAdmin(&m.identity.PublicKey) + pinMessageAllowed := community.AllowsAllMembersToPinMessage() + + if !pinMessageAllowed && !isMemberAdmin { + return nil, errors.New("member can't pin message") + } + } + err := m.handleStandaloneChatIdentity(chat) if err != nil { return nil, err diff --git a/protocol/protobuf/communities.pb.go b/protocol/protobuf/communities.pb.go index 196855a0f1d..5caa3bfd89f 100644 --- a/protocol/protobuf/communities.pb.go +++ b/protocol/protobuf/communities.pb.go @@ -246,6 +246,7 @@ type CommunityDescription struct { BanList []string `protobuf:"bytes,7,rep,name=ban_list,json=banList,proto3" json:"ban_list,omitempty"` Categories map[string]*CommunityCategory `protobuf:"bytes,8,rep,name=categories,proto3" json:"categories,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` ArchiveMagnetlinkClock uint64 `protobuf:"varint,9,opt,name=archive_magnetlink_clock,json=archiveMagnetlinkClock,proto3" json:"archive_magnetlink_clock,omitempty"` + AdminSettings *CommunityAdminSettings `protobuf:"bytes,10,opt,name=admin_settings,json=adminSettings,proto3" json:"admin_settings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -332,6 +333,52 @@ func (m *CommunityDescription) GetArchiveMagnetlinkClock() uint64 { return 0 } +func (m *CommunityDescription) GetAdminSettings() *CommunityAdminSettings { + if m != nil { + return m.AdminSettings + } + return nil +} + +type CommunityAdminSettings struct { + PinMessageAllMembersEnabled bool `protobuf:"varint,1,opt,name=pin_message_all_members_enabled,json=pinMessageAllMembersEnabled,proto3" json:"pin_message_all_members_enabled,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommunityAdminSettings) Reset() { *m = CommunityAdminSettings{} } +func (m *CommunityAdminSettings) String() string { return proto.CompactTextString(m) } +func (*CommunityAdminSettings) ProtoMessage() {} +func (*CommunityAdminSettings) Descriptor() ([]byte, []int) { + return fileDescriptor_f937943d74c1cd8b, []int{4} +} + +func (m *CommunityAdminSettings) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommunityAdminSettings.Unmarshal(m, b) +} +func (m *CommunityAdminSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommunityAdminSettings.Marshal(b, m, deterministic) +} +func (m *CommunityAdminSettings) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommunityAdminSettings.Merge(m, src) +} +func (m *CommunityAdminSettings) XXX_Size() int { + return xxx_messageInfo_CommunityAdminSettings.Size(m) +} +func (m *CommunityAdminSettings) XXX_DiscardUnknown() { + xxx_messageInfo_CommunityAdminSettings.DiscardUnknown(m) +} + +var xxx_messageInfo_CommunityAdminSettings proto.InternalMessageInfo + +func (m *CommunityAdminSettings) GetPinMessageAllMembersEnabled() bool { + if m != nil { + return m.PinMessageAllMembersEnabled + } + return false +} + type CommunityChat struct { Members map[string]*CommunityMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Permissions *CommunityPermissions `protobuf:"bytes,2,opt,name=permissions,proto3" json:"permissions,omitempty"` @@ -347,7 +394,7 @@ func (m *CommunityChat) Reset() { *m = CommunityChat{} } func (m *CommunityChat) String() string { return proto.CompactTextString(m) } func (*CommunityChat) ProtoMessage() {} func (*CommunityChat) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{4} + return fileDescriptor_f937943d74c1cd8b, []int{5} } func (m *CommunityChat) XXX_Unmarshal(b []byte) error { @@ -416,7 +463,7 @@ func (m *CommunityCategory) Reset() { *m = CommunityCategory{} } func (m *CommunityCategory) String() string { return proto.CompactTextString(m) } func (*CommunityCategory) ProtoMessage() {} func (*CommunityCategory) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{5} + return fileDescriptor_f937943d74c1cd8b, []int{6} } func (m *CommunityCategory) XXX_Unmarshal(b []byte) error { @@ -472,7 +519,7 @@ func (m *CommunityInvitation) Reset() { *m = CommunityInvitation{} } func (m *CommunityInvitation) String() string { return proto.CompactTextString(m) } func (*CommunityInvitation) ProtoMessage() {} func (*CommunityInvitation) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{6} + return fileDescriptor_f937943d74c1cd8b, []int{7} } func (m *CommunityInvitation) XXX_Unmarshal(b []byte) error { @@ -535,7 +582,7 @@ func (m *CommunityRequestToJoin) Reset() { *m = CommunityRequestToJoin{} func (m *CommunityRequestToJoin) String() string { return proto.CompactTextString(m) } func (*CommunityRequestToJoin) ProtoMessage() {} func (*CommunityRequestToJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{7} + return fileDescriptor_f937943d74c1cd8b, []int{8} } func (m *CommunityRequestToJoin) XXX_Unmarshal(b []byte) error { @@ -598,7 +645,7 @@ func (m *CommunityRequestToJoinResponse) Reset() { *m = CommunityRequest func (m *CommunityRequestToJoinResponse) String() string { return proto.CompactTextString(m) } func (*CommunityRequestToJoinResponse) ProtoMessage() {} func (*CommunityRequestToJoinResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{8} + return fileDescriptor_f937943d74c1cd8b, []int{9} } func (m *CommunityRequestToJoinResponse) XXX_Unmarshal(b []byte) error { @@ -659,7 +706,7 @@ func (m *CommunityMessageArchiveMagnetlink) Reset() { *m = CommunityMess func (m *CommunityMessageArchiveMagnetlink) String() string { return proto.CompactTextString(m) } func (*CommunityMessageArchiveMagnetlink) ProtoMessage() {} func (*CommunityMessageArchiveMagnetlink) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{9} + return fileDescriptor_f937943d74c1cd8b, []int{10} } func (m *CommunityMessageArchiveMagnetlink) XXX_Unmarshal(b []byte) error { @@ -710,7 +757,7 @@ func (m *WakuMessage) Reset() { *m = WakuMessage{} } func (m *WakuMessage) String() string { return proto.CompactTextString(m) } func (*WakuMessage) ProtoMessage() {} func (*WakuMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{10} + return fileDescriptor_f937943d74c1cd8b, []int{11} } func (m *WakuMessage) XXX_Unmarshal(b []byte) error { @@ -787,7 +834,7 @@ func (m *WakuMessageArchiveMetadata) Reset() { *m = WakuMessageArchiveMe func (m *WakuMessageArchiveMetadata) String() string { return proto.CompactTextString(m) } func (*WakuMessageArchiveMetadata) ProtoMessage() {} func (*WakuMessageArchiveMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{11} + return fileDescriptor_f937943d74c1cd8b, []int{12} } func (m *WakuMessageArchiveMetadata) XXX_Unmarshal(b []byte) error { @@ -849,7 +896,7 @@ func (m *WakuMessageArchive) Reset() { *m = WakuMessageArchive{} } func (m *WakuMessageArchive) String() string { return proto.CompactTextString(m) } func (*WakuMessageArchive) ProtoMessage() {} func (*WakuMessageArchive) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{12} + return fileDescriptor_f937943d74c1cd8b, []int{13} } func (m *WakuMessageArchive) XXX_Unmarshal(b []byte) error { @@ -906,7 +953,7 @@ func (m *WakuMessageArchiveIndexMetadata) Reset() { *m = WakuMessageArch func (m *WakuMessageArchiveIndexMetadata) String() string { return proto.CompactTextString(m) } func (*WakuMessageArchiveIndexMetadata) ProtoMessage() {} func (*WakuMessageArchiveIndexMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{13} + return fileDescriptor_f937943d74c1cd8b, []int{14} } func (m *WakuMessageArchiveIndexMetadata) XXX_Unmarshal(b []byte) error { @@ -973,7 +1020,7 @@ func (m *WakuMessageArchiveIndex) Reset() { *m = WakuMessageArchiveIndex func (m *WakuMessageArchiveIndex) String() string { return proto.CompactTextString(m) } func (*WakuMessageArchiveIndex) ProtoMessage() {} func (*WakuMessageArchiveIndex) Descriptor() ([]byte, []int) { - return fileDescriptor_f937943d74c1cd8b, []int{14} + return fileDescriptor_f937943d74c1cd8b, []int{15} } func (m *WakuMessageArchiveIndex) XXX_Unmarshal(b []byte) error { @@ -1011,6 +1058,7 @@ func init() { proto.RegisterMapType((map[string]*CommunityCategory)(nil), "protobuf.CommunityDescription.CategoriesEntry") proto.RegisterMapType((map[string]*CommunityChat)(nil), "protobuf.CommunityDescription.ChatsEntry") proto.RegisterMapType((map[string]*CommunityMember)(nil), "protobuf.CommunityDescription.MembersEntry") + proto.RegisterType((*CommunityAdminSettings)(nil), "protobuf.CommunityAdminSettings") proto.RegisterType((*CommunityChat)(nil), "protobuf.CommunityChat") proto.RegisterMapType((map[string]*CommunityMember)(nil), "protobuf.CommunityChat.MembersEntry") proto.RegisterType((*CommunityCategory)(nil), "protobuf.CommunityCategory") @@ -1026,85 +1074,87 @@ func init() { proto.RegisterMapType((map[string]*WakuMessageArchiveIndexMetadata)(nil), "protobuf.WakuMessageArchiveIndex.ArchivesEntry") } -func init() { - proto.RegisterFile("communities.proto", fileDescriptor_f937943d74c1cd8b) -} +func init() { proto.RegisterFile("communities.proto", fileDescriptor_f937943d74c1cd8b) } var fileDescriptor_f937943d74c1cd8b = []byte{ - // 1187 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x5d, 0x6f, 0x1a, 0x47, - 0x17, 0xce, 0xf2, 0xb9, 0x1c, 0xb0, 0x83, 0x27, 0xfe, 0xd8, 0x90, 0x37, 0x31, 0x59, 0xbd, 0x95, - 0x88, 0xaa, 0x62, 0x85, 0xa8, 0x52, 0xd4, 0x8f, 0x24, 0xc4, 0x45, 0x29, 0xb5, 0x0d, 0xc9, 0x80, - 0x9b, 0x36, 0x37, 0xab, 0x65, 0x19, 0xe3, 0x91, 0x61, 0x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x0b, 0xc2, 0x1c, 0x9f, 0x8e, 0x39, 0xf5, 0xdc, - 0x79, 0x71, 0xb4, 0x58, 0x71, 0x50, 0x03, 0xb2, 0xaa, 0xae, 0xcc, 0x48, 0x94, 0x93, 0x95, 0x7c, - 0xed, 0xc3, 0x15, 0x41, 0xc4, 0x60, 0xaa, 0xaa, 0x2c, 0xac, 0xe1, 0x72, 0x7f, 0x86, 0x43, 0x5f, - 0xf4, 0x02, 0xf2, 0xe3, 0x79, 0xa4, 0x32, 0x1f, 0xf9, 0xda, 0x83, 0xab, 0xf3, 0x81, 0xe3, 0x2e, - 0xa8, 0x06, 0x7a, 0xa8, 0x57, 0x23, 0x2d, 0xdd, 0x77, 0x63, 0xee, 0x52, 0x5f, 0xea, 0x14, 0x47, - 0xf7, 0xd0, 0x73, 0x48, 0x0b, 0xe5, 0x31, 0x23, 0x23, 0xa9, 0x3f, 0xba, 0x86, 0xba, 0x40, 0x09, - 0x88, 0x2b, 0x3f, 0x51, 0xf6, 0x9e, 0xed, 0x5a, 0x43, 0xca, 0xb8, 0x91, 0x2d, 0x27, 0x2b, 0x39, - 0x9c, 0xed, 0xd9, 0xee, 0x31, 0x65, 0x1c, 0xb5, 0x00, 0x1c, 0x9b, 0x93, 0x81, 0xe7, 0x53, 0xc2, - 0x0c, 0x5d, 0x3e, 0x50, 0xbd, 0xee, 0x81, 0xc8, 0x41, 0xbd, 0x12, 0x43, 0x40, 0x4f, 0xc1, 0xb0, - 0x7d, 0xe7, 0x9c, 0x4e, 0x89, 0x35, 0xb2, 0x07, 0x2e, 0xe1, 0x43, 0xea, 0x5e, 0x58, 0xaa, 0x22, - 0x39, 0x59, 0x91, 0xdd, 0xe0, 0xfc, 0x24, 0x3a, 0x3e, 0x14, 0xa7, 0xa5, 0x53, 0x28, 0xc4, 0x93, - 0x8e, 0x8a, 0x90, 0xbc, 0x20, 0x4a, 0xa6, 0x39, 0x2c, 0x96, 0xe8, 0x00, 0xd2, 0x53, 0x7b, 0x38, - 0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cc, 0xdb, 0xfc, 0xcb, 0x8d, 0x77, 0xf9, 0xea, 0xc1, 0xa7, 0xa1, - 0x67, 0x2f, 0x23, 0x57, 0x4f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xe0, 0x31, 0x48, 0x4a, - 0x0c, 0x00, 0x00, + // 1261 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x37, + 0x13, 0xce, 0xea, 0xcb, 0xd2, 0xc8, 0x76, 0x64, 0x26, 0x71, 0x36, 0xce, 0x9b, 0x58, 0x59, 0xbc, + 0x05, 0x14, 0x14, 0x55, 0x10, 0x07, 0x05, 0x82, 0x7e, 0x24, 0x51, 0x1c, 0x21, 0x55, 0x63, 0x4b, + 0x09, 0x65, 0x37, 0x6d, 0x0e, 0x5d, 0x50, 0x5a, 0x5a, 0x26, 0xbc, 0xcb, 0x55, 0x97, 0x94, 0x51, + 0xf5, 0xd0, 0x5b, 0x81, 0xfe, 0x84, 0x02, 0x05, 0x7a, 0x29, 0xd0, 0x3f, 0xd2, 0x7b, 0xef, 0xbd, + 0xf5, 0xa7, 0x14, 0x24, 0x77, 0x57, 0x2b, 0x5b, 0x72, 0x02, 0x04, 0x3d, 0x2d, 0x87, 0x9c, 0x79, + 0x38, 0xf3, 0xcc, 0x70, 0x66, 0x61, 0x63, 0x18, 0x06, 0xc1, 0x84, 0x33, 0xc9, 0xa8, 0x68, 0x8e, + 0xa3, 0x50, 0x86, 0xa8, 0xac, 0x3f, 0x83, 0xc9, 0xd1, 0xd6, 0x95, 0xe1, 0x31, 0x91, 0x2e, 0xf3, + 0x28, 0x97, 0x4c, 0x4e, 0xcd, 0xb1, 0x73, 0x0a, 0xc5, 0xe7, 0x11, 0xe1, 0x12, 0xdd, 0x81, 0xd5, + 0xc4, 0x78, 0xea, 0x32, 0xcf, 0xb6, 0xea, 0x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85, 0x75, 0x4a, 0x23, 0x91, 0xd4, 0xee, 0x1a, 0x4e, 0x44, 0x85, + 0x75, 0x14, 0x85, 0x41, 0xec, 0xae, 0x5e, 0xa3, 0x75, 0xc8, 0xc9, 0x50, 0xbb, 0x59, 0xc0, 0x39, + 0x19, 0x22, 0x47, 0xd5, 0x07, 0x97, 0x94, 0xcb, 0x03, 0x1d, 0x40, 0xa1, 0x9e, 0x6f, 0xac, 0xe2, + 0xb9, 0x3d, 0xe7, 0x77, 0x0b, 0xd0, 0x79, 0x07, 0x2e, 0xb8, 0xf8, 0x09, 0x94, 0x83, 0xd8, 0xbd, + 0xb8, 0x2e, 0x32, 0x5d, 0x72, 0x79, 0x28, 0x38, 0xb5, 0x42, 0xf7, 0x15, 0x82, 0xd6, 0x51, 0x3f, + 0x20, 0xaa, 0xcf, 0x5e, 0x5b, 0x88, 0x80, 0x53, 0x35, 0xe7, 0x4f, 0x0b, 0xb6, 0xcf, 0x63, 0x77, + 0xb8, 0x47, 0xbf, 0x7f, 0x07, 0xae, 0xde, 0xdf, 0xe5, 0x4d, 0x28, 0x85, 0x47, 0x47, 0x82, 0xca, + 0x98, 0xdd, 0x58, 0x52, 0x59, 0x10, 0xec, 0x07, 0x1a, 0xff, 0x47, 0xeb, 0xf5, 0xd9, 0xfc, 0x17, + 0xd2, 0xfc, 0x3b, 0x7f, 0x59, 0x70, 0x7d, 0x49, 0x14, 0xe8, 0x05, 0x94, 0xe3, 0xdf, 0x8a, 0x64, + 0xf8, 0xdc, 0xbb, 0xc8, 0x47, 0x6d, 0xd4, 0x8c, 0x85, 0x78, 0x0e, 0xa5, 0x00, 0x5b, 0x47, 0xb0, + 0x36, 0x77, 0xb4, 0xa0, 0xad, 0x3f, 0x9e, 0x6f, 0xeb, 0x77, 0xdf, 0x7a, 0x59, 0xca, 0xca, 0xac, + 0xcd, 0x3f, 0x5d, 0x7b, 0x53, 0x6d, 0xde, 0xfb, 0x34, 0xb1, 0x1c, 0x94, 0xf4, 0xea, 0xc1, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xa5, 0xbf, 0xbe, 0xf3, 0x0c, 0x00, 0x00, } diff --git a/protocol/protobuf/communities.proto b/protocol/protobuf/communities.proto index d657bfff487..1081e4c18ba 100644 --- a/protocol/protobuf/communities.proto +++ b/protocol/protobuf/communities.proto @@ -44,6 +44,11 @@ message CommunityDescription { repeated string ban_list = 7; map categories = 8; uint64 archive_magnetlink_clock = 9; + CommunityAdminSettings admin_settings = 10; +} + +message CommunityAdminSettings { + bool pin_message_all_members_enabled = 1; } message CommunityChat { diff --git a/protocol/requests/create_community_request.go b/protocol/requests/create_community_request.go index c7f92206e9f..6c478ca21b7 100644 --- a/protocol/requests/create_community_request.go +++ b/protocol/requests/create_community_request.go @@ -29,6 +29,7 @@ type CreateCommunity struct { ImageBx int `json:"imageBx"` ImageBy int `json:"imageBy"` HistoryArchiveSupportEnabled bool `json:"historyArchiveSupportEnabled,omitempty"` + PinMessageAllMembersEnabled bool `json:"pinMessageAllMembersEnabled,omitempty"` } func adaptIdentityImageToProtobuf(img *userimages.IdentityImage) *protobuf.IdentityImage { @@ -87,6 +88,9 @@ func (c *CreateCommunity) ToCommunityDescription() (*protobuf.CommunityDescripti Access: c.Membership, EnsOnly: c.EnsOnly, }, + AdminSettings: &protobuf.CommunityAdminSettings{ + PinMessageAllMembersEnabled: c.PinMessageAllMembersEnabled, + }, } return description, nil }