* test: add reply creation tests
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: access checking being bypassed for post creation when first post is deleted
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: recover tests
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: make provider public
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: notifications grant access to private data of posts
* chore: fix tests
* test: start with tests about notification subject visibility
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: check subject access before sending notification to user
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Daniël Klabbers <daniel@klabbers.email>
* fix: check post visibility when mentioning
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: `mentionsPosts` include is not used and leaks private posts
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chre: use `PostRepository`
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: evaluated page title content
* chore: add comment
* chore: use DOMParser instead
* fix: use `innerHTML` for the actual value
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
* test(subscriptions): approved reply sends out notifications to users
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* feat: send notifications when a post is approved
The code in approval was extracted into a listener because no matter what listeners are always executed before subscribers even if the extension is set to load before.
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* add yiq calculator util
* fix: convert 3 chars hex to 6 chars hex
* fix: clarify util name
* feat: add text color variables not depending on the dark/light mode
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* chore: change `var` to `let`
Co-authored-by: David Wheatley <david@davwheat.dev>
* chore: throw an exception when no serializer is provided to the controller
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
* test: no serializer set throws exception
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>