Prevent email addresses from being counted as mentions

AI-generated summary

A discussion was started by damien about preventing email addresses from being counted as mentions. zogstrip initially didn’t understand the issue, but gerhard clarified that email addresses are being counted against the max_mentions_per_post limit.

After further investigation by sam, it was confirmed that email addresses are being incorrectly counted as mentions. codinghorror and watchmanmonitor also contributed to the discussion, and zogstrip eventually fixed the issue with a commit to the Discourse repository.

The fix ensures that email addresses are no longer counted as mentions, and damien thanked the community for the quick resolution.

Hi there,

Is there any built-in way to prevent this behaviour or is a plugin ?

Thanks!

4 „Gefällt mir“

Not sure I understand what you mean since emails aren’t counted as mention (test: foo@damien.bar).

2 „Gefällt mir“

I think he means that email addresses are counted against the max_mentions_per_post.
I can’t test it right now, but I think I noticed this too some time ago. Not sure if it still happens…

3 „Gefällt mir“

Aha if we can repro that we should fix @techapj.

1 „Gefällt mir“

Seems to be fixed.. I could do that as a new user on try .. http://try.discourse.org/t/this-is-alot-of-emails/356

1 „Gefällt mir“

Yeah this is bust … tagging as a bug

1@test.com 1@best.com @best @not

Post.find(162234).raw_mentions
=> ["test", "best", "not"]

There should be 0 raw mentions on my post here cause nobody was mentioned.

4 „Gefällt mir“

Exactly, sorry I could not provide more input.

I could not see any post or issue related to this problem, and I thought that may be related to some misusage of the application in some way eheh

Thanks for the quick answer!

This is now fixed :pizza:

https://github.com/discourse/discourse/commit/96aa5b865ffc50e7ba25f343c0cfeed967552353

Thanks @damien for reporting that issue :slightly_smiling:

3 „Gefällt mir“