Backfilled messages use a puppet to mimic the linked account posting messages, but this is not the case when the bot is live running.
Any message sent from instagram fail with the following error:
Nov 25 07:20:45 mathilda python[4435]: [2021-11-25 07:20:45,020] [[email protected]] Fatal error handling Instagram item
Nov 25 07:20:45 mathilda python[4435]: Traceback (most recent call last):
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 350, in ensure_joined
Nov 25 07:20:45 mathilda python[4435]: await self.join_room(room_id, max_retries=0)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 83, in wrapper
Nov 25 07:20:45 mathilda python[4435]: return await __method(*args, **kwargs)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/client/api/rooms.py", line 270, in join_room
Nov 25 07:20:45 mathilda python[4435]: content=content, query_params=query_params)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/api.py", line 299, in request
Nov 25 07:20:45 mathilda python[4435]: return await self._send(method, full_url, content, query_params, headers or {})
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/api.py", line 221, in _send
Nov 25 07:20:45 mathilda python[4435]: errcode=errcode, message=message)
Nov 25 07:20:45 mathilda python[4435]: mautrix.errors.request.MForbidden: You are not invited to this room.
Nov 25 07:20:45 mathilda python[4435]: During handling of the above exception, another exception occurred:
Nov 25 07:20:45 mathilda python[4435]: Traceback (most recent call last):
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 350, in ensure_joined
Nov 25 07:20:45 mathilda python[4435]: await self.join_room(room_id, max_retries=0)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 83, in wrapper
Nov 25 07:20:45 mathilda python[4435]: return await __method(*args, **kwargs)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/client/api/rooms.py", line 270, in join_room
Nov 25 07:20:45 mathilda python[4435]: content=content, query_params=query_params)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/api.py", line 299, in request
Nov 25 07:20:45 mathilda python[4435]: return await self._send(method, full_url, content, query_params, headers or {})
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/api.py", line 221, in _send
Nov 25 07:20:45 mathilda python[4435]: errcode=errcode, message=message)
Nov 25 07:20:45 mathilda python[4435]: mautrix.errors.request.MForbidden: You are not invited to this room.
Nov 25 07:20:45 mathilda python[4435]: The above exception was the direct cause of the following exception:
Nov 25 07:20:45 mathilda python[4435]: Traceback (most recent call last):
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix_instagram/portal.py", line 673, in handle_instagram_item
Nov 25 07:20:45 mathilda python[4435]: await self._handle_instagram_item(source, sender, item, is_backfill)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix_instagram/portal.py", line 758, in _handle_instagram_item
Nov 25 07:20:45 mathilda python[4435]: event_id = await self._handle_instagram_text(intent, item, item.text)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix_instagram/portal.py", line 635, in _handle_instagram_text
Nov 25 07:20:45 mathilda python[4435]: return await self._send_message(intent, content, timestamp=item.timestamp // 1000)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/bridge/portal.py", line 80, in _send_message
Nov 25 07:20:45 mathilda python[4435]: return await intent.send_message_event(self.mxid, event_type, content, **kwargs)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 94, in wrapper
Nov 25 07:20:45 mathilda python[4435]: await __self.ensure_joined(room_id)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 356, in ensure_joined
Nov 25 07:20:45 mathilda python[4435]: await bot.invite_user(room_id, self.mxid)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 94, in wrapper
Nov 25 07:20:45 mathilda python[4435]: await __self.ensure_joined(room_id)
Nov 25 07:20:45 mathilda python[4435]: File "/opt/mautrix-instagram/lib/python3.7/site-packages/mautrix/appservice/api/intent.py", line 354, in ensure_joined
Nov 25 07:20:45 mathilda python[4435]: raise IntentError(f"Failed to join room {room_id} as {self.mxid}") from e
Nov 25 07:20:45 mathilda python[4435]: mautrix.errors.base.IntentError: Failed to join room !pPRsTtrCYqdmBgtlzy:server.com as @instagrambot:serveur.com
Expected behavior: A puppet is invited, transmit the message then leaves. This may be related to #15.