buddypress-group-email-subscription icon indicating copy to clipboard operation
buddypress-group-email-subscription copied to clipboard

BP email templates assume that activity items have content

Open boonebgorges opened this issue 7 years ago • 2 comments

The default format for bp-ges-single emails is defined at https://github.com/boonebgorges/buddypress-group-email-subscription/blob/8b2eb5a91e56d36af86847c352fb12815ea7ba8a/bp-activity-subscription-functions.php#L570

The format $action: <blockquote>$content</blockquote> makes sense for activity items that have content/excerpts, such as blog posts/comments, forum posts, activity updates. But the format doesn't make sense for other sorts of activity, such as new group memberships.

Should we have a separate email type for content-free activity items? I know it feels like overkill, but the only alternative I can think of is to filter and modify the placeholders on the fly, which defeats the purpose of having admin-editable email types.

boonebgorges avatar Feb 07 '18 19:02 boonebgorges

Good catch.

At the moment, does this mean that there's an empty <blockquote> element in the HTML email?

If so, I would rather dynamically remove the <blockquote> element than introduce another email post type solely for no-content items.

If you're okay with that, I'll try and get to this and write up a unit test.

r-a-y avatar Feb 07 '18 20:02 r-a-y

It's also the colon that comes after the {{{ges:action}}} element.

Parsing this and the blockquote out dynamically will only work if the admin hasn't modified the template. Maybe this is acceptable, but it's worth noting.

boonebgorges avatar Feb 07 '18 20:02 boonebgorges