Reply then edit to add quote notification redundancy

When someone replies to you while quoting you, you get two notifications: one for the reply and one for the quote. Is this intended? It seems a bit redundant to me.

7 Likes

Yeah this is not intended and borderline a bug…

Can you confirm you got 2 notifications here?

3 Likes

I didn’t here, but maybe that’s because you replied to the topic and not another post. I did have this issue on another reply from you five days ago:

image

As well as from someone else earlier today:

image


Did you get two notifications from this reply? I think it happens every time (again barring the reply to topic).

1 Like

This is a direct reply not to the topic.

I totally believe it is happening, just want an exact repro.

I only got a reply notification… That’s weird. So I guess it doesn’t happen every time, though I see it quite often.

I don’t see any difference between your reply here and the ones that caused the issue before. They are both replies to the previous post (non-topic) with quotes from the same post. Here are links to the two I referenced above if you can spot a difference.

Beginners Guide to Install Discourse on Windows 10 for Development

`min ratio to crop` site setting should respect w/h ratio as defined in markdown

The only other thing I can think of is that the quote notifications seem to be delayed sometimes, generally coming after the reply notification. If those notifications come from a background task, maybe there’s some kind of race condition.

4 Likes

Yeah this very much feels like a race condition to me.

4 Likes

Doesn’t it happen when you first just reply, and then edit with a quote afterwards?

5 Likes

It does happen in those cases, but I doubt only in those cases. It happens often enough that it seems unlikely that that many people are adding quotes on edit. Perhaps @sam can confirm if he wrote the post I referenced at once or edited it after the fact with a quote. If he remembers since it was 6 days ago at this point.

I just got this as well for this reply/quote, screenshot:

4 Likes

In that case I did first reply, and then saved and then almost immediately edited to add the quote to give better context. So that would explain two notifications - once for the reply, and then for the quote when I edited it.

5 Likes

Ah, thanks, that would explain it then.

1 Like

I still wonder if there’s some kind of race condition where quotes made in the original reply (not on edit) can be treated like a quote added on edit. Just from the timing that is.

I only got one notification for this quote/reply. That doesn’t rule out the race condition entirely, but this is more likely the scenario Falco mentioned, i.e. replying then editing quickly to add a quote.

6 Likes

So we need to ask users not to do this :slight_smile:

It does seem to happen as an afterthought. You write a post quickly and submit it, but then you realize the context may not be entirely obvious and go back to add the quote.

Now that the “quote on edit” aspect has been mentioned I’ve been paying more attention, and I’ve been quoted several times without getting the quote notification. So it does appear likely related to that. Unfortunately I can’t really verify anything on my own since I’m not going to ask someone if they added the quote on edit every time I get the quote notification.

If it really does only happen on edit (and never from a race condition), it’s actually kind of a nice “feature” because it lets you know that more was added to a post even if you already read it.

6 Likes

This does happen to me way too much recently … I just got a triple from @downey.

@kris.kotlarek can you investigate this? At least confirm that this is not possible in a non race condition kind of case (reply directly, then edit to add a quote)

As a general rule we should never notify that something has a “mention” if it is already a direct reply.

Protecting against timing is going to be tricky, we are going to need a distributed mutex on the user/post pair, lets hold a bit before we add that.

10 Likes

This is my potential solution. The idea is to not create a notification, if the user already has unread new reply notification.

If new reply notification was read, then we still want to have a notification that post was edited and for example, the quote was added because that additional information may be valuable to the recipient.

https://github.com/discourse/discourse/pull/8921

9 Likes

I am not sure … I think this is overthinking the problem a bit.

If I directly respond to :arrow_double_up: right now… then tomorrow come back to this post after you read it and add the word “casino” you will not get a notification.

I edited the post, it was a direct reply to you.

Why should me adding an edit that is a quote to an actual post you made carry any extra weight? Why is that more important than me completely obliterating this post and replacing it with a zebra picture :slight_smile:

:zebra:

I think we should simplify here… only one notification per post of type mention/direct reply… ever.

I suspect part of this issue got introduced by this @pmusaraj ? https://github.com/discourse/discourse/commit/27387b085951c50cafa1c1e26c6560f0e1dceda3#diff-cd1361f608a9acc555b6ba47a8235020

6 Likes

I understand you, let’s simplify that.

I thought there is a notification when just edit a direct reply, if not, let’s follow that pattern.

It is a small risk like for example, you will write a post like
“Hey Kris, could you finish that feature?”
I will answer
“Sure, no worries”
Then, next week you will change the original message to “hey Kris, could you lend me 1 million dollars?”
In that case, I will never know you asked me for a favor :slight_smile:

Nevertheless, it sounds like a very edge case :slight_smile:

I think that case is already not handled, the strange handling we have now is:

At this point, currently you have not gotten any dupe notifications, you are only notified of the initial reply. The strange edge case we have is that after all of this you add a quote:

… and then you get a dupe notification.

This new notification just does not make sense, cause you already promised me 1 million dollars and we told you nothing about that

:blush:

2 Likes