Zulip: Handle quoted-mention edge cases properly.

Created on 8 Jan 2018  路  4Comments  路  Source: zulip/zulip

If somebody does a quote-and-reply to a message that has a mention, and they leave the mention inside the quoted portion, Zulip currently behaves as if the new message also mentions the original mentioned person.

This was probably never an intentional decision, as the naive implementation doesn't distinguish whether the message is in quoted section.

The current behavior is somewhat defensible in some cases. If somebody mentions me, and then another person replies to the message that mentions me, I may want to know about both parts of the conversation.

If I reply to myself, that's a bit different, since I obviously know about the message, and the primary use cases that we know about for self-mentioning are a) testing mentions works and b) marking a message as something to come back to, but neither of those use cases is really necessary when the first message is already mentioned.

We have to make a decision here:

  • just ignore this, and let folks work around the self-mention issue
  • only fix the quote-self-mention use case
  • consistently ignore mentions inside quoted blocks

I think the second option is best for users, but it may lead to a complicated implementation and it may hard to explain to users how things work.

markdown notifications (messages) bug high

All 4 comments

Hello @zulip/server-markdown members, this issue was labeled with the area: markdown label, so you may want to check it out!

@PentaHiggs this might be a good issue for you to look at. I think I'd be pretty happy with a solution that just avoids triggering the normal mention behavior for quoted-self-mentions inside quoted blocks.

I am strongly in favor of consistently ignore mentions inside quoted blocks

Tagged this as a priority, since it seems to have gotten lost and would be valuable to fix.

I think ignoring mentions in quoted blocks is probably the simplest implementation and makes the most sense, so we should start with that as @Xerus2000 suggests; if we find that isn't the right model, we can iterate from there.

I'm not sure what the right approach for this inside python-markdown is; possibly it's a late-stage TreeProcessor that just scans for mentions inside a blockquote tag, and doesn't include those in the list of mentioned user IDs that it exports?

Was this page helpful?
0 / 5 - 0 ratings