GJ Group Messages

3 months 14 hours ago #336850 by krileon
Replied by krileon on topic GJ Group Messages

It sends the message fine now (email or PMS), but it also logs an activity.

Logs an activity entry or logs a notification? It should not be logging either for group messages. What you might be seeing as a PMS notification being logged, which is toggled on/off with CB Activity > Parameters > Notifications > Private Messages parameters. Please check to see if you have those on.


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.

2 months 14 hours ago #337325 by AlanJones
Replied by AlanJones on topic GJ Group Messages
The AutoAction you suggested to me works great for sending emails when a notification is logged on all my sites.
But this weekend, building a new site, it worked for about 2 or three, then stopped sending emails. I can't for the life of me figure out why.
The site is sending mails fine, and CB sends mails fine also (registration), it's just this AutoAction.
Could you take a look? I'll send backend login for you.
Here was your solution (which works great everywhere else):
Repair DB: utf8mb4_unicode_ci
AutoAction:
Global
Triggers: activity_onAfterNotificationEntityStore
Type: Email
User: Code
Access: Everybody

User
if ( ! $variables->getPublished() ) {
    return [];
}

return $variables->getRecipients();

Action
Subject: CB Activity Notification as Email
Body:
This is a test email. Below is the context URL linking to what the notification is about (e.g. activity post, gj group, etc..)
[cb:parse function="getContext" class="var2" /]

Parameters
Format Functions: Yes

Own Your Own Community!

Please Log in to join the conversation.

1 month 4 weeks ago #337342 by krileon
Replied by krileon on topic GJ Group Messages
activity_onAfterNotificationEntityStore only triggers if a notification was actually stored. If the grouping behavior kicks in that trigger won't fire. My guess is the grouping logic was applied.

Have released a new CB Activity build release adding the trigger to the grouping behavior notification stores. Please update and see if that fixes your issue.


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.

1 month 4 weeks ago #337346 by AlanJones
Replied by AlanJones on topic GJ Group Messages
Updated and still the same.
The notification is storing (and appears in the little globe icon & dropdown). 
Also the same AutoAction is in all my other sites and the email is send no problem.
Lastly it was working, for the first 3 or 4 times, then it stopped. 
I must have done something to break it.

Own Your Own Community!

Please Log in to join the conversation.

1 month 4 weeks ago #337348 by krileon
Replied by krileon on topic GJ Group Messages
I don't know what more to suggest. The only reason that trigger won't fire is if there was nothing to store. In other words it had no recipients. I guess you can just try bypassing CB Activity entirely and handle it with GJs trigger. Below should work.

Triggers: gj_onGroupMessage
User: Code
User:
return $variables['var2'];

That triggers variables are as follows.
$_PLUGINS->trigger( 'gj_onGroupMessage', [ $row, &$users, &$subject, &$message ] );

$row = GJ group
$users = array of users to message
$subject = message subject
$message = message itself


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.

1 month 4 weeks ago #337349 by AlanJones
Replied by AlanJones on topic GJ Group Messages
Well in this instance I'm not using GJ, I am using comments on Articles. I may build GJ functionality into this site later.
But maybe there's an article comment trigger? I'll look.

Own Your Own Community!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.206 seconds