I’m actually now trying to add the same behavior to supersub and sub. I see the ‘ass_this_activity_is_important’ filter, that could be used to mark things as false to make it not send the email. But that doesn’t give me the info I need since I would need the user ID for atleast my purposes.

I’m wondering if perhaps I should not change the way I was trying to solve this problem by replacing it with something like this inside the subscribed users loop:
`
$this_activity_is_important = apply_filters( ‘ass_this_activity_is_important_per_user’, $content->id, $user_id, $group_id, $group_status );
`

Sorry for having submitted something that wasn’t 100% thought out. Again I’m not sure if this is the best way, latching onto the existing is_important, but it seems like re-using the current mechanism wouldn’t be such a bad idea. Your thoughts?

ya you are right, I was attacking this problem all wrong. Basically I wanted to filter which user get which updates based on the language the update is posted in.
I finally finished with adding this inside the ass_group_notification_activity() function
`
$skip = false;
$skip = apply_filters( ‘ass_skip_group_notification_per_user’, $content->id, $user_id, $group_id, $group_status );
if ($skip){
continue;
}
`

I suspect that its not the most optimal way of coding it, it looks bloated for what its doing, but I’m not 100% sure of the standard to represent this type of logic in wordpress. I am open to suggestions. I will send over a svn patch after I’m done everything. I’m also adding
`
do_action(‘ass_digest_fire’,$type);
`
in ass_digest_fire();
since I might add a few more things I’ll refrain from sending you some half ass things that I’ll change later (like I did before… my apologies)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘small patch to allow plugins to filter ass_digest_record_activity’ is closed to new replies.