Lock notification says "locked" even when the discussion is unlocked

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
api, backend

Research direction

Start with locale/en.yml at the linked notification text, then trace the lock and unlock notification data sent to the client. Reproduce the lock and unlock actions and verify that the delivered notification uses distinct wording for each state.

Written by the indexing model from the issue text.

Description

Bug Report

Current Behavior

Currently when you lock a discussion the web notification that is generated says "{user} locked".

The text is the same even if the admin/mod actually unlocked the discussion.

https://github.com/flarum/lock/blob/c4383c318899fce6d5e7c936695edbe5f7f49c88/locale/en.yml#L28

Steps to Reproduce

  1. Lock a discussion
  2. Notice the text of the notification delivered to the discussion author

Expected Behavior

I think the notification text should distinguish between locked/unlocked.

Environment

  • Flarum version: 1.2.0

Possible Solution

The notification data should include whether the action is lock or unlock, in order to expose that information to the client.

Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

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/issue-archive

All issues in flarum/issue-archive

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.