Fix panic syncing community token gated

This commit is contained in:
Andrea Maria Piana 2023-11-29 13:58:07 +00:00
parent 9acabc6995
commit b4b9db8578
1 changed files with 6 additions and 0 deletions

View File

@ -3254,6 +3254,12 @@ func (m *Messenger) handleSyncInstallationCommunity(messageState *ReceivedMessag
return err return err
} }
// TODO: if the community is token gated, it will be validated asynchronously
// syncing needs to be adjusted in this case
if savedCommunity == nil {
return nil
}
if err := m.handleCommunityTokensMetadataByPrivilegedMembers(savedCommunity); err != nil { if err := m.handleCommunityTokensMetadataByPrivilegedMembers(savedCommunity); err != nil {
logger.Debug("m.handleCommunityTokensMetadataByPrivilegedMembers", zap.Error(err)) logger.Debug("m.handleCommunityTokensMetadataByPrivilegedMembers", zap.Error(err))
return err return err