Likes sends notifications for post types that have no text body

Open
#4,108 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
backend

Research direction

Start by tracing the Likes extension's notification path and reading the Post type class; compare the approaches discussed in pull requests #4075 and #4095. The work is done when Post types can explicitly control whether Likes notifications are sent, while leaving the behavior extensible for future Post types.

Written by the indexing model from the issue text.

Description

type/bug type/feature
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.

Dominant language
PHP
Stars
6.8k
Forks
891
Avg merge
1d 10h
Merged PRs (30d)
209

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flarum/framework

All issues in flarum/framework

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.