flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.39k stars 834 forks source link

Likes sends notifications for post types that have no text body #4108

Open luceos opened 2 weeks ago

luceos commented 2 weeks ago

Current Behavior

We received two pull requests (#4075 and #4095) where the Likes extension is modified to only send notifications for the Post type Comment. The problem seems to be that the notification cannot render the content as text for any other Post type.

Although the proposed solutions are valid solutions to this problem, we need something that is future proof and extensible.

Possible Solution

What we need to do is extend the Post type class with a property that allows us to signify whether a Post type is allowed to notify.

The benefit is that implementations of Post type can easily be adapted to this new feature, without sacrificing any flexibility.