fix: populate API Chat with channel members

This commit is contained in:
Patryk Osmaczko 2023-07-26 12:23:07 +02:00 committed by osmaczko
parent 367b7722d1
commit 0465ab668d
1 changed files with 5 additions and 1 deletions

View File

@ -419,7 +419,11 @@ func getChatMembers(sourceChat *protocol.Chat, community *communities.Community,
}
if community != nil {
for member := range community.Description().Members {
channel, exists := community.Chats()[sourceChat.CommunityChatID()]
if !exists {
return result, communities.ErrChatNotFound
}
for member := range channel.Members {
pubKey, err := common.HexToPubkey(member)
if err != nil {
return nil, err