Connection request rejected notification

3 years 2 months ago #322746 by boyjahq
What is the best way to alert a member when their connection request with another member was rejected. We can see that they are alerted when the connection was accepted, but cannot find something similar for rejected requests. Is there a built in function that we are not finding? If not, what is the best mechanism in the CB tool chest to add it?

Please Log in to join the conversation.

3 years 2 months ago #322749 by krileon
Replied by krileon on topic Connection request rejected notification
Use CB Auto Actions and act on the onAfterDenyConnection trigger to send a notification. Such functionality used to exist, but it's a bit mean in most contexts so we no longer provide that. Below is the available trigger variables.

$_PLUGINS->trigger( 'onAfterDenyConnection', array( $userId, $connectionId, $ueConfig['useMutualConnections'], $ueConfig['autoAddConnections'] ) );

User id can be used in the Email auto action so [var2] can be used as "To" to email them that connection request was denied.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: boyjahq

Please Log in to join the conversation.

3 years 2 months ago #322754 by boyjahq
Replied by boyjahq on topic Connection request rejected notification

krileon wrote: Such functionality used to exist, but it's a bit mean in most contexts so we no longer provide that. Below is the available trigger variables.


We understand that point and have discussed it internally at length. But in the end, we were persuaded by the number of support emails we get asking if the other member has received their connection request and when it will be responded to. We will use your suggestion to add that functionality and at the same time will create a message notification that is as kind as possible!

For this purpose, is there also a way for us to allow the member rejecting the connection to add a note of explanation to the rejection?

Please Log in to join the conversation.

3 years 2 months ago #322756 by krileon
Replied by krileon on topic Connection request rejected notification

For this purpose, is there also a way for us to allow the member rejecting the connection to add a note of explanation to the rejection?

No, such a feature doesn't exist in the Connections behavior. Something to consider when we rewrite the CB Connections plugin.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 1 month ago #323103 by boyjahq
Replied by boyjahq on topic Connection request rejected notification
We have successfully created this Auto Action and it is working. Now how can we make it so that the content of the message matches the recipient's language as set in their language parameter?

We tried using language substitutions for subject and message, but it only seems to send based on the sender language, not the recipient.

We also tried making 2 versions of the Auto Action (1 for each language) and then experimented with using the Languages field under Conditions for the auto action, but these also seem to be based solely on the sender's language (or the site language). No combination of these conditions settings that we tried were able to ascertain the recipient's language and send accordingly.

Is there a way to determine the recipient's language parameter and have the auto action send the appropriate language email?

Please Log in to join the conversation.

3 years 1 month ago #323116 by krileon
Replied by krileon on topic Connection request rejected notification
CB Auto Actions doesn't do a language switch in its Email action as it originally didn't support using a user id for the To address. Since it now does allow specifying a recipient by user id it should be possible for it to do the language swapping. Have added a feature ticket for this.

forge.joomlapolis.com/issues/8373

You won't need to make any changes to your auto actions beyond being sure you're using a user id as the To parameter and not an email address since it won't try to find the user by email address alone. If a user id isn't supplied I'll have it swap the language to the user object of the auto action itself. Then once this is implemented and released it'll simply just work.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: boyjahq

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.231 seconds

Facebook Twitter LinkedIn