fix: add missing information
This commit is contained in:
parent
0f423e262d
commit
f9b87c4ae1
|
@ -682,6 +682,10 @@ func (o *Community) Muted() bool {
|
|||
return o.config.Muted
|
||||
}
|
||||
|
||||
func (o *Community) MemberIdentity() *ecdsa.PublicKey {
|
||||
return o.config.MemberIdentity
|
||||
}
|
||||
|
||||
// UpdateCommunityDescription will update the community to the new community description and return a list of changes
|
||||
func (o *Community) UpdateCommunityDescription(signer *ecdsa.PublicKey, description *protobuf.CommunityDescription, rawMessage []byte) (*CommunityChanges, error) {
|
||||
o.mutex.Lock()
|
||||
|
|
|
@ -84,6 +84,13 @@ type ChannelGroup struct {
|
|||
Chats map[string]*Chat `json:"chats"`
|
||||
Categories map[string]communities.CommunityCategory `json:"categories"`
|
||||
EnsName string `json:"ensName"`
|
||||
Admin bool `json:"admin"`
|
||||
Verified bool `json:"verified"`
|
||||
Description string `json:"description"`
|
||||
Permissions *protobuf.CommunityPermissions `json:"permissions"`
|
||||
Members map[string]*protobuf.CommunityMember `json:"members"`
|
||||
CanManageUsers bool `json:"canManageUsers"`
|
||||
Muted bool `json:"muted"`
|
||||
}
|
||||
|
||||
func NewAPI(service *Service) *API {
|
||||
|
@ -116,6 +123,11 @@ func (api *API) GetChats(ctx context.Context) (map[string]ChannelGroup, error) {
|
|||
Chats: make(map[string]*Chat),
|
||||
Categories: make(map[string]communities.CommunityCategory),
|
||||
EnsName: "", // Not implemented yet in communities
|
||||
Admin: true,
|
||||
Verified: true,
|
||||
Description: "",
|
||||
Permissions: &protobuf.CommunityPermissions{},
|
||||
Muted: false,
|
||||
}
|
||||
|
||||
for _, chat := range channels {
|
||||
|
@ -138,6 +150,12 @@ func (api *API) GetChats(ctx context.Context) (map[string]ChannelGroup, error) {
|
|||
Images: make(map[string]images.IdentityImage),
|
||||
Chats: make(map[string]*Chat),
|
||||
Categories: make(map[string]communities.CommunityCategory),
|
||||
Admin: community.IsAdmin(),
|
||||
Verified: community.Verified(),
|
||||
Description: community.DescriptionText(),
|
||||
Permissions: community.Description().Permissions,
|
||||
CanManageUsers: community.CanManageUsers(community.MemberIdentity()),
|
||||
Muted: community.Muted(),
|
||||
}
|
||||
|
||||
for t, i := range community.Description().Identity.Images {
|
||||
|
|
Loading…
Reference in New Issue