Special usernames for Conversation::actionAdd()

digitalpoint

Well-known member
I've run into the situation a few times where we have a link for users to start a conversation with moderators or admins with the username pre-filled for them like so:

https://example.com/conversations/add?to=admin1,admin2,admin3

However, those links become stale over time as mods/admins come and go or change their usernames. It leads to people contacting someone who is no longer a mod/admin for something mod/admin-related.

It would be nice if the Conversation::actionAdd() method could take a couple special "usernames" where you may want the message to go to all mods or all admins (at the time). Something like a username of @admins and/or @moderators

So if you had a link that is intended for all admins, it could be:

https://example.com/conversations/add?to=@admins

It looks like it would be a fairly simple change to the actionAdd() method... ignore initial username validation if the username starts with @, then expand it out to the true usernames when someone submits their message.

I'm going to go ahead and extend the Conversation class to do it on my end, but seems like it may have use for others (and looks to be fairly simple changes to that one method).
 
Upvote 10
Also have all three of those as options, so each site can change the keywords to what ever they want. Has usergroup permissions on who can use the keywords.
Very similar to ideas I had for it as well. 👍👍

What I plan on doing with ours is adding to the following phrase:

1636417564772.png

...with something like Enter "@staff" to contact the staff, "@admin" to contact all admins, or "@moderators" to contact all moderators. in the green highlighted area. Or something less clumsy.
 
Top Bottom