Skip to content
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

Create a Conversations section #354

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

rakoo
Copy link
Contributor

@rakoo rakoo commented Dec 10, 2023

Hey there,

Thanks a lot for your application, it's really wonderful ! I'm loving the ideas you put forward, and the result is just so gorgeous :)

One of the domains I want to see the Fediverse grow is Conversations, aka person-to-person messages because it can help make any Fediverse tool a more generic tool for doing stuff together.

The situation

There are some ways to put private Conversations forth here and there, all of them a little bit incompatible with each other:

  • Pleroma has a specific Chat activity type, but it is only spoken by Pleroma
  • Friendica has a special section for Conversations, but all of them must have a title. When receiving from non-Friendica, the title is "[no subject]". And it's not always recognized as a conversation, but sometimes as a direct mention with private visibility so you have to juggle between the two; in Friendica-land it seems a conversation is a different entity from a direct mention with private visibility, but when translating that to AP they are both the same
  • Firefish has the same kind of situation but doesn't have the issue with the title.

It's all a mess, because it looks like each software wants to be compatible with itself first and others after.

How it's done here

I took a different approach here: I assume all software speak the Mastodon API (which is far from perfect but is becoming a de facto standard) and do the filtering and triaging from there. Here's the flow:

  • When opening Conversations, we get the list of conversations aka threads from MastoAPI, de-duplicate by the set of participants such that two threads with the same participants appear only once, and sort all of them by the most recent one
  • When opening a Conversation, we get the same list again to get all threads and display them in the order they appear from the api, ie the most recent thread first. I reuse the <Timeline> component to automagically thread and display all of that, it's just fantastic.

Here's a quick preview of what the list of conversations looks like:
Screenshot Phanpy Conversations

Here's a quick preview of what a specific conversation looks like:
Screenshot Phanpy Conversation

Now there are many questions, from most important to least important:

Is this actually needed ?

This PR is mostly to start a conversation (ha!) about the topic (you can tell by the low code quality, it's mostly a poc), and the functionality might not be needed, but I feel like it is interesting still. There is a "mentions" view with a "private" tab, but a) you only see the mentions for each message, not the full context unless you click and b) you can't quickly go to a specific contact.

Right now the flow to reply to a thread is the same as usual, click on one, that opens the side bar, then click on reply. To create a new thread in this "context" of conversations, however, you need to manually mention the people and change visibility; it would be really helpful to have it all prefilled when opening the compose modal. Taking a step back, that means having a compose modal that depends on the page that is currently displayed, and I think it can make sense: if you're listing a hashtag and open compose, prefill with the hashtag. If you're on the page of an account and click on compose, prefill with a mention (there's already a "mention " button, but doing it with compose is more generic).

If it's not needed because that's not the direction you want to go in, feel free to close and I'll do my thing on my side :)

Security ?

All messages are readable by admins, in essence what we have here is exactly the same as email. Which means the same tools can be built on top with the same caveats.

Should non-private messages be displayed ?

In the current state all messages in a thread are displayed, including non-private ones. I haven't decided yet if they should be displayed in this view or not, because there are reasonable arguments on both sides.

Name ?

I like conversations more than chat because it conveys the idea that it's encapsulated in a context, and even with the same people you might have multiple conversations.

@cheeaun
Copy link
Owner

cheeaun commented Dec 11, 2023

Is it possible for you to deploy this on your GitHub Pages (or any static site hosts) so that I can try it out? Should work with a subfolder path.

@cheeaun cheeaun added enhancement New feature or request idea labels Dec 11, 2023
@rakoo rakoo force-pushed the conversations branch 2 times, most recently from e0a9e61 to ea9fd9e Compare December 11, 2023 10:30
@rakoo
Copy link
Contributor Author

rakoo commented Dec 11, 2023

Here you go ! https://rakoo.github.io/phanpy/

(I added the github actions in the repo)

@cheeaun
Copy link
Owner

cheeaun commented Dec 11, 2023

Ok this is embarrassing on my part; the subfolder hosting isn't working after auth-ed for some reason, so that's another bug 🫣 Will look into this.

@rakoo
Copy link
Contributor Author

rakoo commented Dec 11, 2023

Ah shoot, too bad, that's interesting because it worked for me on Pleroma 😄

@cheeaun
Copy link
Owner

cheeaun commented Dec 12, 2023

Added f213a8e fix, so maybe you can pull and redeploy, thanks 🙇‍♂️

@rakoo
Copy link
Contributor Author

rakoo commented Dec 12, 2023

Updated !

@filipesmedeiros
Copy link
Sponsor

All messages are readable by admins, in essence what we have here is exactly the same as email

Just want to add that this is only true for bad providers like Google. Stuff like Proton is E2EE so admins can't read the content of the email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants