User Mentions Improvements by Xon

User Mentions Improvements by Xon 1.7.0

No permission to download
Thank you. And if someone is online and reads their alert about being mentioned, will they still receive the email?
 
Killing this addon on my end as well, it doesn't appear to be supported at all anymore.

I just discovered what I consider a major bug. When tagging a group, I noticed that some bounces came back that really didn't make sense...old user accounts that I specifically recall had previously been disabled by the automated bounce handler...well, at least one of them was for sure. So I checked and lo and behold, one was disabled (Email invalid (bounced)) and the other was still valid. So I manually changed the other to bounced then tagged those members and checked the sent email log on my server and whaddaya know...they got sent an email for the tag, both of them.

So I disabled Tag Me to rule out XF core and tagged them again...no email was sent.

So this addon somehow bypasses the validity check of the core XF email system, how it does that I do not know but bye bye. Switching to Xon's.
I don't think my add-on implements the last activity check, but I'll get that in ASAP.
 
Just so I'm clear, it wasn't anything to do with the last activity...honestly I'm not sure how an email got sent out at all because I figured (assumed) that any email that would get generated by the forum would somehow have to get "piped" through the status checker to make sure that it wasn't invalid before an email got sent for anything at all. Apparently this is not the case...how else would one explain how a tag alert is being sent to an account with the User State set as invalid/bounced? It does it for group mentions as well as individual mentions!
 
So I take it that this was an incorrect assumption on my part?
I figured (assumed) that any email that would get generated by the forum would somehow have to get "piped" through the status checker to make sure that it wasn't invalid before an email got sent for anything at all.
 
It does it for group mentions as well as individual mentions!
Yes, group mentions are just individual mentions with a tiny bit of extra metadata attached.

So I take it that this was an incorrect assumption on my part?
Sadly yes, it was an incorrect assumption. If you implement custom emailing like I do, you need to add the checks yourself.

But should be working now :)

(Assuming I haven't made a logic error, and now it no longer emails anyway :p)
 
This is really strange...I thought for sure that the basic structure of the code for a forum would have any emails generated by the forum routed through a common handler of some kind that does all the appropriate checks to make sure that someone doesn't erroneously get messages. I have people that have requested that their account be disabled and/or disabled mentions in their user account (at my direction) assuming that this would then stop them from receiving any email whatsoever, but now I come to find out that this entire system can be bypassed by an addon.

Not to start a huge debate about this but is that wrong of me to assume that one shouldn't need to add the exact same core XF checks into an addon that also can initiate an email of any kind? That's a huge red flag for me, because the user preferences and bounce checks are supposed to stop messages from going to user's email addresses that aren't valid of are unwanted. This means that I literally have people that I have manually changed over to "bounced" after they have requested so after getting incessant messages about mentions...and they still haven't stopped apparently. That leads people to start flagging those messages as spam because they're ticked off that the messages just won't stop...all the while I had no idea this was still happening. Unless this was only recently triggered by a change in XF core after an update, because I don't recall this popping up until just recently
 
My add-on doesn't email people by default when tagged, so most probably never enable it.

And yes, it kinda does suck that there isn't a standard baked in way to "send an email to a user" and have XenForo enforce the activity/bounced handling checks.
 
Ok just to clarify - this addon only applies to Group Mentions, not individual mentions, correct? Meaning, the core XF User Mentions functionality for individual mentions is not affected - correct?

So once this is installed, everyone's user setting defaults to not getting an email on a Group Mention for a usergroup they are a part of? Is there a way to default-enable that? For our purposes, this would be desired (they would have to manually opt out of group mentions)

Maybe I just need to install it on a test site....
 
Ok just to clarify - this addon only applies to Group Mentions, not individual mentions, correct? Meaning, the core XF User Mentions functionality for individual mentions is not affected - correct?
It builds group mentions as a stream of individual mentions. And then on an individual mention, allows a user to me emailed if they are mentioned.

So once this is installed, everyone's user setting defaults to not getting an email on a Group Mention for a usergroup they are a part of? Is there a way to default-enable that? For our purposes, this would be desired (they would have to manually opt out of group mentions)
To change the default for new signups; Under admin.php?options/list/usersAndRegistration, there is the option "Receive email when mentioned".

You will then need to run SQL to update existing users:
Code:
update xf_user_option set  sv_email_on_tag = 1;

Maybe I just need to install it on a test site....
Always recommended!
 
Ok stupid question...but does default XF not send an email when a user is mentioned? For some reason I thought it did, but when I looked on my user preferences here, I do not see a check box for turning that on and off...I swear it did this by default

Yup so now I feel stupid, I thought for some odd reason that default XF did generate an email when someone is mentioned, turns out, it does not. huh...brain fart.
 
Last edited:
Heya so on my tagged groups i am facing on issue. Tagging several of them at once is resulting on nobody getting the alert.

I can't tag 2 specific usergroups without none of them getting any alert.

I think i fixed it, i added words in between both mentions?
 
So @group1 @group2 ?

That should work, the group tag detection code is literally a slightly modified version of the individual detection code that XenForo uses.

Note @group1@group2 will not work. You need a space between them.
 
Yeah i was adding a space, i added 2 and all fine, however once adding 4,5 groups on the same line none of them would get the alert, so idk why it happens .
 
Yeah i was adding a space, i added 2 and all fine, however once adding 4,5 groups on the same line none of them would get the alert, so idk why it happens .
Can you PM me the group names? it might be the matching is behaving wierdly in some cases.

Also what version of XF, and are you using the standard editor or something else?
 
@Xon so I'm not sure if this is a bug, or what the hell this is really, but I figured I'd bring it to your attention. The setup is I have three user groups tagged in this post - supporters, moderators, and trolls. when i go in to edit the post and add the registered user group, it changes the other three groups to numbers (0,1,2) and leaves the registered tag. When I edit the tags back to their original names, it changes the registered user group tag to a number (0).

4.webp
3.webp
2.webp
5.webp
6.webp

Also, the system doesn't seem to register the tag group when added in after the post was made. When I tried to add in the group in the edit box it didn't send out alerts.
 
Last edited:
Yes, this add-on doesn't change how XenForo does tagging w.r.t. to editing a post.

I've sporadically seen that turning a group tag into a 0, but haven't been able to solidly reproduce it to debug it.
 
Top Bottom