flarum / issue-archive

0 stars 0 forks source link

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

Open matteocontrini opened 2 years ago

matteocontrini commented 2 years ago

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

Possible Solution

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