diff --git a/mautrix_facebook/user.py b/mautrix_facebook/user.py index 2730308b77a05da0c75239d6dff99a0a7a9d1a90..0eaeca5c8f2f86a81d39763f7e8e889c2d92985f 100644 --- a/mautrix_facebook/user.py +++ b/mautrix_facebook/user.py @@ -364,7 +364,8 @@ class User(BaseUser): if contact and ic: contact.edit(in_community=True) elif not contact: - DBContact(user=self.fbid, contact=puppet.fbid, in_community=ic).insert() + # This uses upsert instead of insert as a hacky fix for potential conflicts + DBContact(user=self.fbid, contact=puppet.fbid, in_community=ic).upsert() async def sync_contacts(self): try: diff --git a/requirements.txt b/requirements.txt index 57cf8ae1bbe90ca96d225f14542b07988c84842f..a5a25f5a1d1d1de504bfd98153ca7d43c54e7757 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ ruamel.yaml>=0.15.94,<0.17 commonmark>=0.8,<0.10 python-magic>=0.4,<0.5 mautrix==0.7.0rc4 -fbchat-asyncio>=0.6.13,<0.7 +fbchat-asyncio>=0.6.15,<0.7