facebook icon indicating copy to clipboard operation
facebook copied to clipboard

invite bot on room creation so that it can invite ghost later if needed

Open davitz opened this issue 10 months ago • 3 comments

Fix for https://github.com/mautrix/facebook/issues/314

When not using double puppetting, it would create one-on-one chat rooms with just the user and the bot for the other person. Later, the main bot would attempt to invite the user's ghost into the room, but the main bot itself had never been invited to the room and hence the exception would be thrown. This fix ensures the main bot is always added to the invite list on room creation, meaning that it can later invite ghosts if it needs to.

davitz avatar Aug 25 '23 03:08 davitz

@tulir any chance you could look at this?

slagiewka avatar Sep 14 '23 08:09 slagiewka

Your own ghost isn't supposed to be added to DM rooms. Having any extra users means the room name/avatar need to be managed too since it won't be a DM

tulir avatar Sep 14 '23 14:09 tulir

Yeah, I've been using my fork since I opened this, and while everything else works well, you're right that the conversation names aren't ideal. I've just been waiting until I have more tinkering time to get the double puppetting configured. My understanding from the documentation though is that this is how it's supposed to handle showing messages from yourself that exist in the Facebook chat if you don't have double puppetting enabled.

So then are you saying that when you don't have double puppetting enabled, it is not meant to be possible for messages you sent in the Facebook client to be shown in Matrix?

That seems to contradict the docs, but in that case it should be simple enough to just remove the part where the Facebook bot tries to invite the ghost which is what was blocking the sync.

davitz avatar Sep 22 '23 12:09 davitz