fix: community encryption was not being marshalled

This commit is contained in:
Richard Ramos 2022-10-07 12:08:56 -04:00 committed by r4bbit.eth
parent b9d6e6d8c8
commit d4d35710be
2 changed files with 3 additions and 0 deletions

View File

@ -224,6 +224,7 @@ func (o *Community) MarshalJSON() ([]byte, error) {
IsMember: o.isMember(),
Muted: o.config.Muted,
Tags: o.Tags(),
Encrypted: o.Encrypted(),
}
if o.config.CommunityDescription != nil {
for id, c := range o.config.CommunityDescription.Categories {

View File

@ -98,6 +98,7 @@ type ChannelGroup struct {
CanManageUsers bool `json:"canManageUsers"`
Muted bool `json:"muted"`
BanList []string `json:"banList"`
Encrypted bool `json:"encrypted"`
}
func NewAPI(service *Service) *API {
@ -186,6 +187,7 @@ func (api *API) GetChats(ctx context.Context) (map[string]ChannelGroup, error) {
CanManageUsers: community.CanManageUsers(community.MemberIdentity()),
Muted: community.Muted(),
BanList: community.Description().BanList,
Encrypted: community.Encrypted(),
}
for t, i := range community.Images() {