#4978 Unwanted notification on private ticket
Closed: Fixed 3 years ago by pingou. Opened 3 years ago by misc.

I just stumbled on a bug.

Let's suppose someone write that in a pagure ticket (a block of code, in this case, a irc log):

12:00 @misc> wow, I really want a pizza

Despites it being placed in the section for code (and not markdown), it will trigger a notification (since _add_mentioned_users, in notify.py seems to search in the whole comment, not just the part untouched by the markdown parser).

While that's annoying by itself on a regular ticket, it get a bit more problematic on a private ticket, let's say, one used to signal a CoC incident. If, for example, someone cut and paste IRC logs, I am sure people wouldn't expect the person reported to be notified.


Pretty sure we ran and fixed this in the past, I'll need to go look for the fix again

So, I looked quickly, and I have some untested unlinted untested patch:

https://pagure.io/fork/misc/pagure/c/da72d7ca4e6459a58172f67fcdcb1ca8fd00a0c4?branch=fix_bug

I will try to at least to run flake and/or some syntax verifications and write a test, but for now, that's just a draft of the approach I would use

Looks like a good start yeah

Metadata Update from @ngompa:
- Issue tagged with: Issue tracker, bug

3 years ago

Metadata Update from @pingou:
- Issue set to the milestone: 5.12

3 years ago

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata