Skip to content

[FIX][ENH] Activity Notifications - sending using groupmember parameter was broken, and also improve scalability by sending group notifications by group instead of one notification per user in the group

When trying to send a notification via activity trigger using the "groupmember" parameter as described in https://doc.tiki.org/Activity-Notifications, it was found that it was broken in the sense that only the last user in the group specified actually got any notification. The other members didn't get any notification. When fixing this, it was discovered that the previous design was not scalable at all if the group you are sending to has many members (imagine Registered group).

So instead of storing all the individual users in the notification record in tiki_activity_stream, we now store just the group, and check a user's group memberships to show the notifications that apply to him.

TODO: Improve documentation https://doc.tiki.org/Activity-Notifications as it is misleading as this feature can actually be used without the organic groups addon. It can be configured through the Custom Activities panel if proper instructions are given, or the "wizard like" activity rule creation options that are there are improved. https://dev.tiki.org/Activities

Edited by Nelson Ko

Merge request reports