Sami Mazouz
7ea25d33d9
chore: review
2024-03-28 18:54:38 +01:00
Sami Mazouz
1fe426aba9
fix: approving content
2024-03-08 20:50:37 +01:00
StyleCI Bot
5b0dd88acf
Apply fixes from StyleCI
2024-03-08 13:41:35 +00:00
Sami Mazouz
d0d3c15bbf
feat: refactor approval extension
2024-02-26 16:25:25 +01:00
Rafał Całka
471ce0ea2a
fix(approval): PostWasApproved
event triggered incorrectly
2023-11-23 18:50:47 +01:00
Sami Mazouz
6f11e044a7
chore: update codebase to php8.1 ( #3827 )
...
* chore: set minimum php version to 8.1
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* chore: update codebase to php8.1
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* chore: update workflow php version
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: more caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: phpstan caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: introduce `Flarum\Locale\TranslatorInterface`
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* Apply fixes from StyleCI
* chore: remove mixin
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: test-caught errors
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
* fix: one last error
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
---------
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-05-30 11:36:12 +01:00
Sami Mazouz
94e92cf24e
fix: approving a post does not bump user comment_count
( #3790 )
...
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:13:57 +01:00
Sami Mazouz
da1bf8da21
chore(phpstan): enable phpstan in bundled extensions ( #3667 )
...
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* chore: enable phpstan in bundled extensions
* chore: rebasing conflicts
* chore: rebasing conflicts
* chore: typings for latest 1.7 changes
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-19 21:49:38 +01:00
Sami Mazouz
62a396e434
feat: send notifications of a new reply when post is approved ( #3656 )
...
* 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>
2022-11-07 11:52:28 +00:00
StyleCI Bot
267f6759f8
Apply fixes from StyleCI
2022-09-22 08:21:34 +00:00
Daniël Klabbers
b5874a08e4
fix(approval): posts approved for deleted users error
...
In certain edge cases posts get approved through moderative action and
throws an error when the user has already been deleted.
Ref: DISCUSS-11K on sentry
2022-09-22 10:20:06 +02:00
Ian Morland
237076e5b7
chore(approval, likes): use subscribers ( #3577 )
...
* chore: use subscribers
* Apply fixes from StyleCI
* Un-static
Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-08-02 11:27:26 +01:00
Sami Mazouz
d82a73feed
fix(approval): unapproved posts visible to all when no visibility scopers are added
...
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 19:16:53 +01:00
Alexander Skvortsov
00b9151864
feat: deprecate discussion post_number_index
field.
2022-03-31 08:46:20 +02:00
Alexander Skvortsov
fd48af2032
Massively simplify TagPolicy
2021-05-11 22:16:55 -04:00
Alexander Skvortsov
3b3cbdc82f
Fix conflicts with other extension visibility scoping ( #26 )
...
Wrapping all `wheres` in an `orWhere` ensures that there's no conflict.
See https://github.com/flarum/core/issues/2798 , https://github.com/flarum/docs/pull/200
2021-04-20 14:51:01 -04:00
Alexander Skvortsov
70cbe1d186
Update to use new extenders
2021-03-13 15:15:11 -05:00
imzhi
687e1c41db
ApproveContent then refresh user table DiscussionCount and CommentCount ( #16 )
2021-02-19 08:18:01 -05:00
Alexander Skvortsov
787bbc0f33
Make listener methods static
...
This is needed since we're listening to the individual methods of the class, as opposed to registering the class as a subscriber.
2020-12-10 23:33:45 -05:00
Alexander Skvortsov
8b356d82d1
Apply fixes from StyleCI
2020-12-08 20:08:37 +00:00
Alexander Skvortsov
bd9553eb33
Refactor for new extenders
2020-12-08 15:08:18 -05:00
Sami Mazouz
bebced2d53
Use new extenders ( #23 )
2020-12-08 14:04:22 -05:00
Alexander Skvortsov
86d3c0ce0a
Use $actor->assertCan instead of $actor->can
2020-07-19 16:24:56 -04:00
Matt Kilgore
425ba74903
Remove AssertPermissionTrait ( #19 )
...
* Removed AssertPermissionTrait
* Apply fixes from StyleCI
Co-authored-by: luceos <daniel+github@klabbers.email>
2020-07-19 16:23:03 -04:00
Franz Liedke
6fa5cc4408
Use new Model extender
2020-04-24 15:54:12 +02:00
Franz Liedke
a4d447e39e
Apply fixes from StyleCI
2019-11-29 23:01:32 +00:00
Toby Zerner
1e2c0a895a
Fix incorrect table name
2018-10-23 20:48:51 +10:30
Toby Zerner
d2a00225c7
Clarify ambiguous use of user_id
column which was crashing search queries
2018-10-23 07:23:41 +10:30
Toby Zerner
feb940097c
Database changes ( #15 )
...
* Update database references
* Use whereColumn
* Update core references
2018-09-16 20:49:28 +02:00
Franz Liedke
959f2b654c
Ensure compatibility with DB table prefix
2018-08-03 01:25:15 +02:00
Franz Liedke
c88fcd5cf9
Make StyleCI happy
2018-02-23 23:48:53 +01:00
Toby Zerner
eb36d98b82
Don't need to make empty discussions visible anymore
...
As per flarum/core@557a65aadd
2018-01-30 11:16:10 +10:30
Toby Zerner
f559c9a651
Merge branch 'master' into visibility-scoping
...
# Conflicts:
# bootstrap.php
2018-01-21 08:36:02 +10:30
Toby Zerner
a390f7ca1b
Make sure the discussion is_approved attribute value is correct
2018-01-21 08:34:33 +10:30
Toby Zerner
e8103ad0b3
Fix query errors
2018-01-21 08:33:45 +10:30
Franz Liedke
7435d18940
Adapt new bootstrap format, use Asset extender
2018-01-16 23:17:47 +01:00
Toby Zerner
c0dd66bef5
Update for visibility scoping API changes in core
2018-01-11 12:19:20 +10:30
Toby Zerner
a822ab8310
Fix class name
2017-12-26 19:47:42 +10:30
Toby Zerner
15039737b8
Don't over-cache the disallowed tags
2017-12-26 19:44:53 +10:30
Toby Zerner
6f07aef206
Performance: Reuse list of disallowed tags
2017-12-26 19:44:53 +10:30
Toby Zerner
910ddc9f55
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2017-09-14 09:15:48 +09:30
AakLak
2ea6cbee46
run the convert.sh script by CDK2020 to replace namespaces to be comp… ( #8 )
...
* run the convert.sh script by CDK2020 to replace namespaces to be compatible for beta8
* update docbloc to match updated namespace
2017-09-14 09:15:11 +09:30
Franz Liedke
34bfa56fce
Merge branch 'master' of github.com:flarum/flarum-ext-approval
2017-07-27 00:21:09 +02:00
Toby Zerner
47bf958448
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2016-11-29 05:29:35 +00:00
Franz Liedke
efdff2df68
Extract another variable
2016-11-19 16:57:11 +01:00
liji
29a5240f64
fix:discussion was not updated correctly after approval
2016-11-17 17:19:26 +08:00
Toby Zerner
78bb373a22
Make discussion isApproved attribute available when fetching notifications. fixes flarum/core#976
2016-08-27 22:51:09 +09:30
Toby Zerner
d0c54cdbf9
Only allow OP to add tags that they can start discussions without approval in
...
closes flarum/core#904
2016-05-28 09:52:47 +09:30
Toby Zerner
9f4e11097d
Add actor information to the PostWasApproved event
2016-05-28 09:46:22 +09:30
Toby Zerner
ff6e674854
Give the is_approved attribute a default value on new Post models
2016-05-28 09:46:03 +09:30