Hi,
I'm trying to change the activity messages by changing the message template in $context, but I found it is not working. You may suggest to use hook_activity_messages_alter instead. But the information available via parameters are limited.
function mymodule_activity_record_alter(&$record, &$context){
$context['comment-pattern-en'] = 'Hi, [user] commented on [activity-node-link]';
}
Above code is only a test. My actual requirement is to change the user_relationships activities depending on the relationship type. This is not possible with the template configurations provided by default.
Thank you
Comments
Comment #1
Scott Reynolds commentedcontext isn't passed by reference, so what you are trying will not work. In order to change the messages you must use hook_activity_messages_alter.
Please provide a proposed solution to adjusting hook_actiivity_messages_alter to meet your requirements.
Comment #2
_shyD6 reached its EOL back in February 2016, and there is no active release for D6 for this module anymore.
Development or support is not planned for D6. All D6-related issues are marked as outdated in a bunch.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!