Skip to content

Mark new FB rooms as Direct Chats on Matrix by default #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alexmat2on opened this issue Jan 20, 2017 · 7 comments
Open

Mark new FB rooms as Direct Chats on Matrix by default #4

alexmat2on opened this issue Jan 20, 2017 · 7 comments

Comments

@alexmat2on
Copy link

This would make sense, since Facebook chats are usually 1-1 direct chats. Then Riot will display the Matrix room under the "People" tab, which makes it useful for finding the new room.

@kfatehi
Copy link
Member

kfatehi commented Jan 20, 2017

Oh yeah are you aware if this is something we can do?

@tfreedman
Copy link

This is definitely something you can do, as matrix-appservice-irc does it. The question is just 'how'.

@kfatehi
Copy link
Member

kfatehi commented Jan 22, 2017

We looked into this yesterday and discovered it's a matter of defining m.direct for the matrix user's account_data. not as easy as room tags would have been, but still pretty easy to do. given how easy it is to do this in riot by clicking the user icon and selecting "direct chat", i dont think i'll be implementing it soon

@mijofa
Copy link
Contributor

mijofa commented Mar 7, 2019

I've just been looking through the code to see if I can do anything about this as this is the main annoyance to me that is why I haven't moved away from my bitlbee based system (not the only one, just the main one).
Now from what I understand it, the only time a Matrix room is created is automatically by matrix-puppet-bridge when matrix-puppet-facebook tries to get the room info?
And when the room is created matrix-puppet-facebook has no way of knowing whether it already existed or if it just got created now?

If my understanding of both of those is correct, then I can't see any feasible point in the process for matrix-puppet-facebook to mark the room as direct. Not unless you mark them as direct every single time a new message is sent/received in a particular room, but then the user has no control over it anymore because the next message is just going to completely undo any change the user makes.

Aside from that kind of quick-and-dirty option, I believe this would require a change in the matrix-puppet-bridge library such that the getOrCreateMatrixRoomFromThirdPartyRoomId function would need to somehow be told whether it's a direct or group conversation so that it could do something about that at room creation time. At that point you could set the is_direct parameter when calling createRoom(). Perhaps also set the name of the room at this point?

@thomas-profitt
Copy link
Member

#31 is relevant here. This is kinda-sorta a duplicate, but more limited in scope.

@mijofa
Copy link
Contributor

mijofa commented Mar 8, 2019

Looks like the intended approach there will solve this problem, although apparently that has already been pushed so this should already be happening, yet I'm still seeing the bot joining all new rooms.

@mijofa
Copy link
Contributor

mijofa commented Mar 20, 2019

So, I changed the code such that the is_direct value will eventually get passed to the createRoom call, and it kinda worked. New 1:1 conversations appeared as direct chat rooms, however only stayed there for a moment before switching back to a group room.
I'm not sure why this is happening, perhaps the room is automatically being unmarked as direct when an extra member is being added to the room?

Probably going to be another week or so before I try again, just dumping notes here for future me more than anything else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants