fix: add all members to channel when it is no longer token-gated
This commit is contained in:
parent
971fc0c816
commit
cec81796dc
|
@ -2222,6 +2222,7 @@ func (o *Community) deleteTokenPermission(permissionID string) (*CommunityChange
|
|||
delete(o.config.CommunityDescription.TokenPermissions, permissionID)
|
||||
|
||||
changes := o.emptyCommunityChanges()
|
||||
|
||||
changes.TokenPermissionsRemoved[permissionID] = permission
|
||||
return changes, nil
|
||||
}
|
||||
|
|
|
@ -717,6 +717,11 @@ func (m *Manager) ReevaluateMembers(community *Community, removeAdmins bool) err
|
|||
viewAndPostPermissions := community.ChannelTokenPermissionsByType(chatID, protobuf.CommunityTokenPermission_CAN_VIEW_AND_POST_CHANNEL)
|
||||
|
||||
if len(viewOnlyPermissions) == 0 && len(viewAndPostPermissions) == 0 {
|
||||
// ensure all members are added back if channel permissions were removed
|
||||
_, err = community.PopulateChatWithAllMembers(channelID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue