boonebgorges / buddypress-group-email-subscription

Fine-grained email subscription for activity in BuddyPress groups
36 stars 33 forks source link

Incorrect trailing colon in HTML email template when activity item has no "content" #227

Closed boonebgorges closed 1 year ago

boonebgorges commented 2 years ago

Some activity types have content, and that content is excerpted in BPGES emails. The format in this case is:

{{{ges:action}}}:

{{{usermessage}}}

In cases where usermessage is empty, the same template is used. This means that the action string has a trailing colon, but nothing following it.

The ideal situation is probably to have separate email templates for items with and without usermessage. This will allow targeted formatting like blockquote. However, this strategy is complex - it requires the installation of a new template during upgrade, etc. In the near term, we might simply consider removing the :, making it more-or-less appropriate for both types of activity items.