diff --git a/mautrix_facebook/user.py b/mautrix_facebook/user.py index 0634061981e75466c5826d207c1e9dfc6f1d910a..b03fedd42152fb830b3b76b7a557458449e24d6a 100644 --- a/mautrix_facebook/user.py +++ b/mautrix_facebook/user.py @@ -311,13 +311,17 @@ class User(BaseUser): self.log.exception("Failed to automatically enable custom puppet") await self._create_community() - await self.sync_contacts() - await self.sync_threads() self.log.debug("Updating own puppet info") # TODO this might not be right (if it is, check that we got something sensible?) - own_info = await self.client.fetch_thread_info([self.fbid]).__anext__() + try: + own_info = await self.client.fetch_thread_info([self.fbid]).__anext__() + except Exception: + self.log.warning("Error fetching own info, retrying...", exc_info=True) + own_info = await self.client.fetch_thread_info([self.fbid]).__anext__() puppet = pu.Puppet.get_by_fbid(self.fbid, create=True) await puppet.update_info(source=self, info=own_info) + await self.sync_contacts() + await self.sync_threads() async def _create_community(self) -> None: template = config["bridge.community_template"]