Mention users in comment


(Creak) #61

Although I agree we should focus on public posts first, I strongly approve to do it for limited posts later.

@jhass: I think @augier just had a bit of trouble explaining his solution, but if I understand it right, I think it’s a very good solution.

When the URL is requested, here is what is happening on the server:

  1. The ID of the post (:id) will give the contacts of everyone involved in the post (post author + comments authors) + the list of contacts the author allowed for the post (the visibility list)
  2. Then the ID of the user (:user_handle) will give its contact list
  3. We intersect the visibility list with the user’s contact list; we get the list of user’s contacts that can actually see the post
  4. We merge 1. and 3.
  5. We remove the user itself
  6. The result is the list of contacts the user can mention in his comment.

(Creak) #62

Example: let’s say A is the author, U# are the users and UF# is U#'s contact list filtered out by the post visibility:

  • A posts a limited post
  • U1 comments, he can mention anyone from UF1 + A
  • U2 comments, he can mention anyone from UF2 + A + U1
  • U3 comments, he can mention anyone from UF3 + A + U1 + U2
  • U1 comments back, he can mention anyone from UF1 + A + U2 + U3
  • U2 deletes his comment
  • U1 comments, he can mention anyone from UF1 + A + U3

(Jonne Haß) #63

Creak: I repeat, a pod the post was sent to, which does not host the author of the post, doesn’t and shouldn’t know the contact list of the author nor the full list of recipients of the post.


(Creak) #64

@jhass: I see your point, but what is the solution then? I understand we can’t trust an external pod, but it seems that this problem is unsolvable within these conditions. In order to have this feature, I always see a contact exchange.

The other solution would be to allow to mention the post author, the comments authors and the user’s contacts. Then if the contact mentioned in the comment can’t see the post… well too bad for him!

That would work without having one pod to see the contacts of a user from another pod. But for the end user, that will be very confusing.


(Jonne Haß) #65

The compromise to have this feature somewhat is rather to limit the mentionable contacts to those that already participated in some way (commented, liked, reshared).


(Creak) #66

That being said, I think most of the time, this feature is only used to mention the post author or the comments authors and, less frequently, to ask someone for an opinion on the matter.

That would be easier to understand for the end user that, in limited posts, he can only mention active users on the post.

(BTW an active user could be someone that liked or reshared the post, doesn’t it?)


(Creak) #67

Hehe, I think we’ve got our compromise :wink:


(Comrade Senya) #68

The feature was implemented and will be fully available in diaspora* release 0.7.0.0.


(goob) #69

Bumping this old discussion with a question about the implementation of this excellent feature.

It’s been pointed out to me that mentions in comments aren’t included in the @Mentions stream.

Was it considered whether or not they should be included in that stream when the feature was implemented? I’m not saying they should be – I’m not sure whether it’s better to include them or list only mentions in posts – but I thought it worth raising here in case this is something that was overlooked during the earlier discussions.


(Waithamai) #70

I feel like mentions in comments should’t be included there. All the other links there refer to posts, not to comments, so for me it would be confusing if it was different for mentions.
With /notifications?type=mentioned_in_comment there’s a nice way available to find all these mentions and for me, this is enough.


(Benjamin Neff) #71

I’m not sure. I think it was intentionally not added to the mentions stream, because (as wai said) until then all streams were only about posts. But since the liked and commented streams, this is already a bit different (it’s still not about the content of a comment, but already comments).

I think it could be useful to find all posts where you were mentioned (in the text or the comments), because going via the notifications is far more hidden than the mentions stream. So I probably wouldn’t be against it, if somebody wants to change that behavior.


(Dennis Schubert) #72

I feel like my UX expectations would lead me to a “it should be included in the mentions stream for consistency”, but then reality hits: stream generation is already a complicated mess; and complicated in both database terms and code terms. I’m oversimplifying here, but in basic terms, we loop through each post that you can see and check if it’s relevant for the current stream. For the mention stream, things are already a bit more complicated: we have to look for posts that have no direct connection with the person querying the stream. And things would get more complicated if we added more types of sources.

Now, a mention in a comment and a mention in a post is more or less the same database-wise, so this probably could be done without much pain, but it would probably lead to more “what should be included in what stream” changes, and that could be painful…


(goob) #73

Thanks for your replies, all of you. Just to make it very clear, I’m happy for it to remain as it is; it does make sense as it is when looked at in one way. It was pointed out to me that comment mentions weren’t included, so I thought I’d check whether that was intentional/desired or whether it was something that was overlooked when comment mentions was implemented.


(Dennis Schubert) #74

It’s always good to have this thread, even if it is just as a reference for when we start working on a nicer frontend, so thank’s for starting that.