Turn digest back on for users that have been suppressed

We’ve an instance that, for some, isn’t used much unless and until something very important happens. After x days (as set in the admin UI, default 180) they get their email digest suppressed. But when a once in a decade event happens, they miss important discussion that’s suddenly relevant for them.

We don’t want to email them directly. Is there a way to switch digests back on for them via admin in this use case? Either all of them or ideally selectively, filtered by which group they belong to. Or even individually.

If there isn’t such a method, it’d be great to have!

So something like when there is a new topic (say, about the event), in category x, and they are in group y, send an email digest?

Yes, that’s the general idea. Right now I can only think of a workaround where the user is impersonated and reignited. But that’s far from ideal.

In our use case, something polarising has happened within our community. We have many silent members that would find information about it useful so they can make their own real world decisions.

As admins, we don’t want to stir things up by direct messaging (as that would antagonise the protagonists). But receiving digests again would be a perfect way to get them back into the conversation. The ideal would be for me as admin to select all members in a group and have all their digest triggers reset.

1 Like

You can do it in Rails, something like

group=Group.find_by_name('mygroup')
group_users=GroupUser.where(group_id: group.id)
group_users.each do |gu|
   u = User.find(gu.user_id)
   op=UserOption.where(user_id: u.id)
   op.email_digests = true
   op.digest_after_minutes = ???
   op.save
end

The above code was generated by a human, who may have been hallucinating. Use at your own risk.

5 Likes