plebbit / plebbit-js

A Javascript API to build applications using plebbit
GNU General Public License v2.0
41 stars 7 forks source link

Think of a way to do DMs #51

Open estebanabaroa opened 3 weeks ago

estebanabaroa commented 3 weeks ago

one way to do it could be to just do public replies, but encrypted between the 2 people.

one potential problem with this is that the sub owner can't read the replies, so he can't know if a reply is spam or not, and that's problematic cause people could spam infinite DMs and the sub owner cant stop it.

one potential fix to do would be for the first reply to be public, then you can reply privately once to a reply of a reply. this stops infinite private replies, cause only 1 person can reply privately, the recipient of a public reply, and they can only do it once, so it maxes out the spam to 1.

for example if someone wants to DM the OP, they could reply with "DM?", and the OP could reply to them with a private message, or the OP could reply with "sure" publicly, then the guy who wanted to DM has now access to reply privately.

one downside of this is that it would waste bandwidth for everyone downloading and seeding these private conversations. have to think of some way to fix this.

we can't really allow anyone to dm anyone without some anti spam protection, otherwise anyone can ddos everyone's inbox. we also probably have to have the sub owner seed the private conversation on behalf of users, otherwise both users need to be online at the same time and do P2P with each other, which leaks their IP to each other and forces them to run a plebbit client 24/7.

estebanabaroa commented 3 weeks ago

maybe one thing we could do is a plebbit user could request to DM someone that replied to him, a request to DM would basically be a public reply, but maybe hidden in the frontend, then the recipient of the DM request could "accept" and it would reply encrypted with his DM info, like whatsapp, signal, session, matrix, email, etc. One issue with this is the user that now has this info can leak it to the world if they want. But if the chat app has 1 time rooms, like berty or maybe session has this, the plebbit user can share a one time room, and if this room gets leaked, he just deactivates it.

this would push the responsibility of hosting/seeding the full DM conversation to whatever service the users want to use, instead of having the subplebbit host it and all users download the private conversation. one downside is that both users would need to use and download some external app.

the DM services that a plebbit user has could be advertised in comment.author.dmServices or something, so a user could know before requesting to DM.