Barış Uşaklı
e4c945f636
refactor: allow passing an array to topics.purge and topics.purgePost… ( #14018 )
...
* refactor: allow passing an array to topics.purge and topics.purgePostsAndTopic
deprecate action:topic.purge, add action:topics.purge with array of deleted topics
update usage of topics.purge to pass in an array
fix an issue in posts/delete where cids were passed to parseInt, caused AP cids to get saved into category:NaN
* lint
* refactor: change style
* use array of tids
2026-02-26 13:09:42 -05:00
Barış Soner Uşaklı
a70a62ccf9
refactor: shorter check
2026-02-21 18:56:53 -05:00
Barış Soner Uşaklı
63c9a6e03c
refactor: isHookValid
2026-02-21 18:15:22 -05:00
Barış Soner Uşaklı
07d1f22401
refactor: get rid of global.env, use process.env.NODE_ENV
2026-01-21 20:14:15 -05:00
Julian Lam
8ea377a401
breaking: removal of deprecated privilege hooks
...
* filter:privileges.global.list
* filter:privileges.global.groups.list
* filter:privileges.global.list_human
* filter:privileges.global.groups.list_human
* filter:privileges.list
* filter:privileges.groups.list
* filter:privileges.list_human
* filter:privileges.groups.list_human
* filter:privileges.admin.list
* filter:privileges.admin.groups.list
* filter:privileges.admin.list_human
* filter:privileges.admin.groups.list_human
2025-05-06 13:38:42 -04:00
Julian Lam
547fb482eb
breaking: removal of filter:flags.getFilters
2025-05-06 13:38:42 -04:00
Julian Lam
7e25946cd7
breaking: removal of filter:user.verify.code
2025-05-06 13:38:42 -04:00
Julian Lam
df5c1a938d
breaking: removal of filter:post.purge
2025-05-06 13:38:42 -04:00
Julian Lam
c84b72fb37
breaking: removal of filter:post.purge
2025-05-06 13:38:42 -04:00
Barış Soner Uşaklı
30068245d3
fix: don't crash if there are exceptions in action hooks
...
since some action hooks are called without an await
2025-02-28 11:10:31 -05:00
Barış Soner Uşaklı
3356022a85
refactor: move als requires, move autoLocale to api/page routes
2024-06-10 20:43:22 -04:00
Barış Soner Uşaklı
87a79059f0
fix : #12389 , update privilege group check
2024-03-05 12:37:25 -05:00
Barış Soner Uşaklı
992a9d72c3
maintain old behaviour
2024-02-26 13:19:16 -05:00
Barış Soner Uşaklı
3607834035
static hooks don't return sync data
2024-02-26 09:22:41 -05:00
Barış Soner Uşaklı
03d777745e
Merge branch 'master' into develop
2024-02-26 00:55:11 -05:00
Barış Soner Uşaklı
00e29403f0
fix: closes #12365 , staticHooks with callbacks
2024-02-26 00:50:22 -05:00
Julian Lam
e240d0f92c
fix: move winston logging for plugin hook firing to debug level
2024-02-07 15:07:24 -05:00
Julian Lam
2a1be01ac0
fix: make socket errors and static hook errors less noisy
2023-10-03 12:02:56 -04:00
Barış Soner Uşaklı
f1a80d48cc
10411 ( #12037 )
...
* feat: add type to privilege maps
deprecate old hooks that are used for adding new privileges, new hooks are static:privileges.global.init/static:privileges.categories.init
* deprecate admin priv hooks
* fix: if type doesnt exist default to 'other'
* remove filter
* fix: copy privilege functions to use new filter instead of indices
allow static hooks to use sync functions
* fix: openapi
* test: fix template helper
2023-09-25 20:42:18 -04:00
Barış Soner Uşaklı
a352031388
double static:app.load timeout
2023-06-30 14:48:22 -04:00
Julian Lam
14091de8fe
refactor: flag states so that they are not hardcoded, allow plugins to add additional states, deprecated filter:flags.getFilters hook, closes #11065
2022-12-16 14:58:16 -05:00
Julian Lam
bef236f371
chore: remove unnecessary affected set from deprecated plugin hook
2022-06-15 13:50:12 -04:00
Julian Lam
b9d4724e0f
feat: allowed plugins to modify email verification details prior to db saving or email send/plugin fire
...
+ new hook `filter:user.verify`
- hook `filter:user.verify.code`
2022-06-15 13:49:30 -04:00
Julian Lam
3a015eb8e3
fix: no need to pass in empty Set in deprecated hooks
2022-06-15 13:49:19 -04:00
Barış Soner Uşaklı
5316029f91
fix: dont add caller to arrays
2022-04-13 15:09:58 -04:00
Barış Soner Uşaklı
767973717b
perf: WIP #10449 , allow array of pids for posts.purge ( #10465 )
...
* perf: WIP #10449 , allow array of pids for posts.purge
* refactor: deletePostDiffs
* perf: deletePostFromReplies/deletePostFromGroups
* refactor: upload
* refactor: deleteFromCategoryRecentPosts
deleteFromUsersBookmarks
deleteFromUsersVotes
* feat: closes #10468 , add incrObjectFieldByBulk
* refactor: allow nids for notifications.rescind
* refactor: allow uids array for user.updatePostCount
* refactor: rewrite deleteFromTopicUserNotification to work with an array
* feat: deprecate action:post.purge as well
* lint: add missing comma
2022-04-07 14:06:25 -04:00
Julian Lam
83fd4311b2
chore: delay filter:email.send removal to v2.0.0
2022-03-08 22:35:00 -05:00
Julian Lam
93b80f170b
refactor: show a louder deprecation notice, alert once for each hook, not per plugin per hook
2022-03-08 22:33:02 -05:00
Barış Soner Uşaklı
29b3587d91
test: middleware/expose.js
2021-11-22 19:56:12 -05:00
Barış Soner Uşaklı
fb363957d1
refactor: tab rules
2021-11-18 16:42:18 -05:00
Barış Soner Uşaklı
c437b33652
fix: crash
2021-09-21 13:51:24 -04:00
Barış Soner Uşaklı
15f9aaa6ee
fix: remove caller from payload after hooks is done
...
only if it was added automatically
2021-09-21 13:48:16 -04:00
Julian Lam
dd4e66e22c
fix: push back some deprecations, remove deprecated stuff scheduled for v1.18.0
2021-09-03 12:04:20 -04:00
Barış Soner Uşaklı
e59d357533
feat: als ( #9749 )
...
* feat: als
* fix: up test timeout
* fix: don't overwrite caller if it already exists
* fix: up test timeout for psql
2021-08-30 10:23:38 -04:00
Barış Soner Uşaklı
7c1e163d82
Revert "feat: add _hooks metadata object to all hooks that have object-type params"
...
This reverts commit 46899ccadb .
2021-04-30 12:16:30 -04:00
Julian Lam
46899ccadb
feat: add _hooks metadata object to all hooks that have object-type params
2021-04-30 11:23:07 -04:00
Barış Soner Uşaklı
084c985117
feat: guard against multiple resolves
2021-04-29 10:47:23 -04:00
Barış Soner Uşaklı
5fe97b9c2e
revert: sync hooks
2021-04-28 15:00:43 -04:00
Barış Soner Uşaklı
01956af43a
feat: remove sync hooks support
2021-04-22 11:35:36 -04:00
Barış Soner Uşaklı
34b9aaedee
feat: allow sync function ( #9379 )
...
* feat: allow sync function
* fix: remove async
2021-03-13 12:03:06 -05:00
Barış Soner Uşaklı
e725beaa4a
Revert "feat: allow filter functions that return promises or the data directly"
...
This reverts commit e6c52cf26c .
2021-03-13 11:39:34 -05:00
Barış Soner Uşaklı
e6c52cf26c
feat: allow filter functions that return promises or the data directly
2021-03-13 11:27:53 -05:00
Barış Soner Uşaklı
53f67ff396
fix: regression from filter hook change
2021-03-13 10:12:30 -05:00
Barış Soner Uşaklı
46270f9f20
feat: bring back static hook timeout
2021-03-11 22:56:14 -05:00
Barış Soner Uşaklı
d05d7091ae
refactor: remove async.each/reduce from hooks for better stack traces
2021-03-11 21:44:37 -05:00
Barış Soner Uşaklı
5eb3132dae
feat: add filter:plugins.firehook
2021-03-10 21:43:37 -05:00
Barış Soner Uşaklı
e74df53997
feat: pass modified params, only affects filter hooks
2021-03-08 18:08:47 -05:00
Julian Lam
bf90d15881
feat: new hook static:email.send
...
deprecates filter:email.send
2021-02-25 15:05:58 -05:00
Peter Jaszkowiak
dab3b23575
chore: eslint no-var, vars-on-top
2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5
chore: eslint prefer-arrow-callback
2021-02-08 18:06:44 -05:00