Rotonde / rotonde-client

Rotonde Base Client
https://client-neauoire.hashbase.io/
MIT License
227 stars 49 forks source link

Mention formatting #73

Open Lynncubus opened 6 years ago

Lynncubus commented 6 years ago

Correctly mentioning someone is hard. Multiple users can have the same name which can have odd side-effects. Formatting would fix this, we would know exactly which person was mentioned.

Proposed formatting: <@DAT_URL> ex. <@dat://7b3b4c71a3156664bde25fb3c671f8ff6fed7554a352b03fb7fb2e403c7567f9/> This would be replaced with @lux at feed render.

neauoire commented 6 years ago

I love this idea, I'm up for it if someone wants to implement it 👍

eelfroth commented 6 years ago

I like this too, but how would the interface for this work? it would be rather cumbersome to paste the dat url every time you want to mention someone. so the operator would have to somehow find the correct url and replace the @mentions after you press enter. what's keeping name collisions from happening at that stage?

neauoire commented 6 years ago

This would piggy back on the autocomplete tool I figured. But we already have the ~mention that preformats into the entry.target=dat:// (which I forgot we had?). I think it is already partly implemented.

hermes-diactoros commented 6 years ago

Can you clarify what's the difference between the "~" and "@" mentions?

By the way; I think that the "target" field should be in fact an array, for multiple mentions in a single post. I'm willing to work on all this stuff.

neauoire commented 6 years ago

Sure, the ~ is for anyone, the @ is for anyone who follows you back. Better mentions would be amazing.

hermes-diactoros commented 6 years ago

I think having a message like "hey @0, this is pretty cool. i was told by @1 that etc" and a "targets" array with the dat:// addresses would be pretty decent. In-browser, the user sees usernames and when submitted, Rotonde resolves the usernames from his feed and replaces them by indexes.

As said by @eelfroth, nothing would prevent collisions at that point, so I'm trying to think of ways to make this painless.

neauoire commented 6 years ago

That would be perfect, multi target is definitely needed. I think the current mention tab is only looking for the one target, if you modify the target into an array, make sure that it doesn't crash on backward compatibility if it's a single string. And that mentions go through the array and look for the home.portal's hash 👍

hermes-diactoros commented 6 years ago

Issue: message headers are messed up for multiple mentions.