282 Commits (9521c8deb76748d080f98e7613fe06a2b34fbeb4)

Author SHA1 Message Date
Barış Soner Uşaklı 2720a692cf fix: #11530, fix topic rescheduling
don't display scheduled posts in group page
when topic is rescheduled update post sorted sets with new timestamp
when post is published update group posts zset
fix markTopicRead if topic was read while it was still hidden
2 years ago
Barış Soner Uşaklı e8fb6711b8 fix: #11512, filter by cid 2 years ago
Julian Lam 0788fb5118 feat: #11420, add new GET routes to retrieve pending and invited members of a group, plus accept/reject pending 2 years ago
Barış Soner Uşaklı 3c85b944e3 feat: allow groups to be exempt from maintenance mode
closes #11030
2 years ago
Julian Lam 9b753d6d57
TTL Cache (#10816)
* refactor: move src/cacheCreate.js to src/cache/lru.js

* fix: call new library location for lru cache creator

* feat: add ttl cache

* fix: update upload throttler to use ttl cache instead of lru cache

* chore: add missing dependency

* fix: avoid pubsub conflicts

* fix: use get instead of peek, which is not available in ttl-cache
3 years ago
Julian Lam c07d595662
Update to lru-cache@^7 (#10815)
* chore(deps): bump lru-cache from 6.0.0 to 7.13.1 in /install

Bumps [lru-cache](https://github.com/isaacs/node-lru-cache) from 6.0.0 to 7.13.1.
- [Release notes](https://github.com/isaacs/node-lru-cache/releases)
- [Changelog](https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-lru-cache/compare/v6.0.0...v7.13.1)

---
updated-dependencies:
- dependency-name: lru-cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(lru-cache): remove unneeded `length` params for cache creation, as `maxSize` was not used in those init calls, also renamed some methods to match new method names in lru-cache [breaking]

Added deprecation notices for old params

* fix: replace three direct calls to lru-cache with call to cacheCreate, moved cache creation call in uploads to run on first init as config is not populated at lib init

* test: move configs init above cache reset calls in databasemock

* move some more code above cache clear

* refactor: remove unused

* test: lru

* test: more debug

* test: on more test

* use await helpers.uploadFile

* fix: tests remove logs

* fix: acp cache page

* fix: add in one more guard again cache instantiation with `length` prop but no `maxSize` prop

* fix(deps): bump markdown

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
3 years ago
Barış Soner Uşaklı 2a89ad8288 fix: use escaped group names in invite modal 3 years ago
Magnus 7bd3e31dec
Fullname in notifications (#10157)
* init - fullname notifications setting

* fullname in topic reply

* fullname for group-request-membership

* fullname for group-leave notification

* fullname for new-post-flag & new-user-flag

* removed log

* fullname for user follow

* fullname in message notification

* fullname in follow

* fullname for sendNotificationToPostOwner

* fullname in sendNotificationToTopicOwner

* fullname in doExport

* shorthand name set

* shorter name set

* fullname in notifications

* displayname for notifications

* removed unused require
3 years ago
Barış Soner Uşaklı d9c42c000c feat: show 10 members 3 years ago
Barış Soner Uşaklı fb363957d1 refactor: tab rules 3 years ago
Barış Soner Uşaklı d196409580 refactor: remove more async.eachSeries/mapSeries 3 years ago
psychobunny ae793b4a44 chore: found some hooks that don't play well docgen 3 years ago
gasoved 8168c6c407
fix: purge uploaded images accordingly #9606 (#9611)
* fix: purge uploaded images accordingly

* fix: tests

* fix: relative paths
4 years ago
Barış Soner Uşaklı 90d64fe1df fix: #9398, crash on post flag 4 years ago
Barış Soner Uşaklı 4327a09d76
feat: allow optional fields argument on db.getObject(s) (#9385) 4 years ago
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len 4 years ago
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring 4 years ago
Peter Jaszkowiak 62869bae3d chore: eslint function-paren-newline 4 years ago
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template 4 years ago
Barış Soner Uşaklı 47299ea587
Categories refactor (#9257)
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft

* feat: new category filter/search WIP

* feat: remove categories from /tag

* fix: dont load all categories when showing move modal

* feat: allow adding custom categories to list

* breaking: dont load entire category tree on post queue

removed unused code
add hooks to filter/selector
add options to filter/selector

* feat: make selector modal work again

* feat: replace old search module

* fix: topic move selector

* feat: dont load all categories on create category modal

* fix: fix more categorySelectors

* feat: dont load entire category tree on group details page

* feat: dont load all categories on home page and user settings page

* feat: add pagination to /user/:userslug/categories

* fix: update schemas

* fix: more tests

* fix: test

* feat: flags page, dont return entire category tree

* fix: flag test

* feat: categories manage page

dont load all categories
allow changing root category
clear caches properly

* fix: spec

* feat: admins&mods page

dont load all categories

* fix: spec

* fix: dont load all children when opening dropdown

* fix: on search results dont return all children

* refactor: pass all options, rename options.cids to options.selectedCids

* fix: #9266

* fix: index 0

* fix: spec

* feat: #9265, add setObjectBulk

* refactor: shoter updateOrder

* feat: selectors on categories/category

* fix: tests and search filter

* fix: category update test

* feat: pagination on acp categories page

show order in set order modal

* fix: allow drag&drop on pages > 1 in /admin/manage/categories

* fix: teasers for deep nested categories

fix sub category display on /category page

* fix: spec

* refactor: use eslint-disable-next-line

* refactor: shorter
4 years ago
gasoved 53e0d4d2e0 feat: banned-users group 4 years ago
Barış Soner Uşaklı 89e6c75d58 fix: #9185, fix string boolean values 4 years ago
Julian Lam 5b8558e9a5 feat: allow dashes in privilege group names 4 years ago
Julian Lam 32e36f7b2e feat(api): group ownership API route, switch client-side to use API route 4 years ago
Julian Lam 1cd2689cf6 refactor(api): deprecated groups update socket in favour of API lib 4 years ago
Julian Lam 600807fbe1 fix: don't return deleted: 0 for ephemeral groups 4 years ago
psychobunny 53abada5f0 Revert "feat: option to allow auto-joining of groups (optionally skip the "request membership" step)"
This reverts commit 685f3c6aa6.
4 years ago
psychobunny 685f3c6aa6 feat: option to allow auto-joining of groups (optionally skip the "request membership" step) 4 years ago
Barış Soner Uşaklı f7c738deda fix: #8997, don't send notifications if uids already in group 4 years ago
Julian Lam 6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 4 years ago
Barış Soner Uşaklı 8d060065a0 fix: spec 4 years ago
gasoved 3ccebf112e
feat: invites regardless of registration type, invite privilege, groups to join on acceptance (#8786)
* feat: allow invites in normal registration mode + invite privilege

* feat: select groups to join from an invite

* test: check if groups from invitations have been joined

* fix: remove unused variable

* feat: write API versions of socket calls

* docs: openapi specs for the new routes

* test: iron out mongo redis difference

* refactor: move inviteGroups endpoint into write API

* refactor: use GET /api/v3/users/:uid/invites/groups

Instead of GET /api/v3/users/:uid/inviteGroups

* fix: no need for /api/v3 prefix when using api module

* fix: tests

* refactor: change POST /api/v3/users/invite

To POST /api/v3/users/:uid/invites

* refactor: make helpers.invite awaitable

* fix: restrict invite API to self-use only

* fix: move invite groups controller to write api, +tests

* fix: tests

Co-authored-by: Julian Lam <julian@nodebb.org>
4 years ago
Julian Lam 8518404e22
feat: allow groups to specify which cids to show member posts from (#8875)
* feat: allow groups to specify which cids to show member posts from

* docs: fix tests for openapi

* fix: test breakage caused by improper conditional

* feat: server-side checking of memberPostCids for validity

* feat: admin panel template update to select categories to include

* refactor: privilege helpers.isUserAllowedTo

... to helpers.isAllowedTo, allowing group names to be passed in
4 years ago
Barış Soner Uşaklı f1f9b225b0
feat: #8824, cache refactor (#8851)
* feat: #8824, cache refactor

ability to disable caches
ability to download contents of cache
refactor cache modules to remove duplicated code

* fix: remove duplicate hit/miss tracking

check cacheEnabled in getUncachedKeys
4 years ago
Barış Soner Uşaklı 08ff4041aa fix: missing await 4 years ago
Barış Soner Uşaklı b26e9b5993 fix: #8595, dont save escaped data when renaming groups 4 years ago
Barış Soner Uşaklı 872bacf1c4
Admin/users (#8762)
* feat: wip admin/users

* feat: more work

* feat: more fixes

* feat: #8662, verified/unverified user groups

* feat: add filter

* feat: change user search to use filters array

* refactor: remove unused search call

* fix: tests

* fix: cant join system groups

* fix: upgrade script
4 years ago
Barış Soner Uşaklı dc29f4dca2 refactor: switch to using slugify module 4 years ago
Julian Lam 952dc211dd feat(writeapi): added group joining and deletion 4 years ago
Julian Lam ba345e53e8 feat(writeapi): added POST /api/v1/groups 4 years ago
Barış Soner Uşaklı f1e82b6441 feat: add filter:group.getOwnersAndMembers 5 years ago
Barış Soner Uşaklı f1974fb900 refactor: pass only needed data 5 years ago
Barış Soner Uşaklı f89ec20574 feat: allow passing groupName to user.search 5 years ago
Barış Soner Uşaklı 9df871bee2 fix: tests 5 years ago
Barış Soner Uşaklı 7331faed9f fix: reverse uid checks 5 years ago
Barış Soner Uşaklı ce6b20c4b7 feat: remove topics.async.getTopicData usage 5 years ago
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error 5 years ago
Barış Soner Uşaklı af790e3f5e refactor: shorter code 5 years ago