Commit Graph

116 Commits (e726048e0c6c37983401afccfbf923b9a6a33185)

Author SHA1 Message Date
Barış Soner Uşaklı 4a56388ec3
feat: store topic tags in topic hash ()
* feat: store topic tags in topic hash

breaking: remove color info from tags (use css)

* fix: remove unused tag modal

* fix: tag search
Julian Lam 0960a81468 fix: tests
Barış Soner Uşaklı 84e065752f
fix: ()
dont allow regular user to remove system tags
gasoved 8b79c7f139
fix: regress. rescheduling shouldn't add to sets that pinning removed… ()
* fix: regress. rescheduling shouldn't add to sets that pinning removed from

* test: remove the also from tests
Barış Soner Uşaklı f9df6431c9 revert: revert tag sort
Barış Soner Uşaklı 05f2236193 feat: add reverse of recent to getSortedTopics
gasoved aa0137b1c4
feat: rescheduling (editing ST) ()
gasoved 077330b764
feat: scheduled topics ()
* feat: scheduled topics

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
Barış Soner Uşaklı eb360351e5 fix: , fix guest handles
Barış Soner Uşaklı 0e07f3c9ba feat: allow defining a list of system tags
Peter Jaszkowiak cc9d6fd08b chore: eslint max-len
Peter Jaszkowiak 23f212a4c0 chore: eslint prefer-destructuring
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template
Barış Soner Uşaklı 647d3ba810 fix: removed methods
Barış Soner Uşaklı d2888d1d1f
Category tags ()
* feat: wip category tags

* fix: tag search

* feat: remove debug

* fix: returns of searchTags and autocomplete

* fix: alpha sort

* fix: redis

* fix: delete zsets on category purge, fix another test

* fix: test
Barış Soner Uşaklı 3cd0c9a476 fix: , allow guests to use write api to post/reply
Barış Soner Uşaklı 5bb5ec4618
fix: , clear purged replies and toPids ()
* fix: , clear purged replies and toPids

* fix: redis test
Barış Soner Uşaklı fa4177c3bc fix: , fix feeds
display latest posts instead of oldest in topic rss feed
fix missing await that was causing rss_tokens to not function
fix feed test
more tests for getTopicWithPosts
Barış Soner Uşaklı c718b7293e feat: , min/max tags per category
Barış Soner Uşaklı bb3aa54006 feat: merge changes
allow selecting main topic to merge into
allow specifying a new title for merge topic
upon merge go to correct topic
new tests for merging with options
Barış Soner Uşaklı ec5582b53c
feat: add privilege give/rescind hooks ()
* feat: add privilege give/rescind hooks

action:privileges.categories.give/rescind
action:privileges.global.give/rescind

breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`

* fix: tests, privileges renamed
Barış Soner Uşaklı 81e33b9391 fix:
Barış Soner Uşaklı bfad457275 feat: add methods for adding/removing tags from topics
Julian Lam ccc6118d30
Testing suite integration for openapi spec ()
* feat: testing suite integration for openapi spec

The testing suite now takes the openapi spec into account. It will
check each route defined, make a call to it, and compare the
response with the defined schema. Any mismatches will cause the
test to fail.

* fix(openapi): removed debug stuff from tests

* fix(openapi): fixed some tests

* fix(openapi): added additional check to tests, test fixes

* fix(openapi): better tests, fixed spec errors

* fix(openapi): bad conditional in test

* fix: oops

* fix(openapi): more tests fixing

* fix(openapi): more tests

* fix(openapi): fix some more tests

* fix: verbose'd an info log

* fix: topic pagination route returns schema-optimized pagination block

* fix(openapi): more test/spec fixes

* fix(openapi): accidentally sending in authenticated jar for anon routes

* fix(openapi): more test/spec fixes

* fix(openapi): more spec fixes

* fix: timestampReadable Invalid Date

* fix(openapi): more tests... almost there

* fix(openapi): more tests fixing

* fix(openapi): finally all tests passing

* fix(openapi): added reverse test to compare response to spec

... and fixed all the tests that broke

* fix: remove tests related to group covers, as route is gone

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): object cache is not present for psql

* fix: tests

Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
Barış Soner Uşaklı 8c48f94b96 fix: , dont allow restore if not deleted by self
Barış Soner Uşaklı 10989cccaa fix: meta description missing if url doesn't have post index
Barış Soner Uşaklı 661a0f5068 fix: don't show deleted topics on unread
Barış Soner Uşaklı 6fb29e8408 fix: tests
Barış Soner Uşaklı 310c6fd33f
properly filter /unread /recent /popular /top ()
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs

* fix: add new test

* feat: make sortedSetRangeByScore work with keys on redis

* fix: hardcoded set name

* feat: show topics from readable categories on recent/popular/top

* feat: rewrite unread topics

respect watched categories and followed topics

* fix: term + watched
Baris Usakli ecf39727cc fix:
Barış Soner Uşaklı 805dcd7ca2
Async refactor in place ()
* feat: allow both callback&and await

* feat: ignore async key

* feat: callbackify and promisify in same file

* Revert "feat: callbackify and promisify in same file"

This reverts commit cea206a9b8e6d8295310074b18cc82a504487862.

* feat: no need to store .callbackify

* feat: change getTopics to async

* feat: remove .async

* fix: byScore

* feat: rewrite topics/index and social with async/await

* fix: rewrite topics/data.js

fix issue with async.waterfall, only pass result if its not undefined

* feat: add callbackify to redis/psql

* feat: psql use await

* fix: redis 🌋

* feat: less returns

* feat: more await rewrite

* fix: redis tests

* feat: convert sortedSetAdd

rewrite psql transaction to async/await

* feat: 🐶

* feat: test

* feat: log client and query

* feat: log bind

* feat: more logs

* feat: more logs

* feat: check perform

* feat: dont callbackify transaction

* feat: remove logs

* fix: main functions

* feat: more logs

* fix: increment

* fix: rename

* feat: remove cls

* fix: remove console.log

* feat: add deprecation message to .async usage

* feat: update more dbal methods

* fix: redis :voodoo:

* feat:  fix redis zrem, convert setObject

* feat: upgrade getObject methods

* fix: psql getObjectField

* fix: redis tests

* feat: getObjectKeys

* feat: getObjectValues

* feat: isObjectField

* fix: add missing return

* feat: delObjectField

* feat: incrObjectField

* fix: add missing await

* feat: remove exposed helpers

* feat: list methods

* feat: flush/empty

* feat: delete

* fix: redis delete all

* feat: get/set

* feat: incr/rename

* feat: type

* feat: expire

* feat: setAdd

* feat: setRemove

* feat: isSetMember

* feat: getSetMembers

* feat: setCount, setRemoveRandom

* feat: zcard,zcount

* feat: sortedSetRank

* feat: isSortedSetMember

* feat: zincrby

* feat: sortedSetLex

* feat: processSortedSet

* fix: add mising await

* feat: debug psql

* fix: psql test

* fix: test

* fix: another test

* fix: test fix

* fix: psql tests

* feat: remove logs

* feat: user arrow func

use builtin async promises

* feat: topic bookmarks

* feat: topic.delete

* feat: topic.restore

* feat: topics.purge

* feat: merge

* feat: suggested

* feat: topics/user.js

* feat: topics modules

* feat: topics/follow

* fix: deprecation msg

* feat: fork

* feat: topics/posts

* feat: sorted/recent

* feat: topic/teaser

* feat: topics/tools

* feat: topics/unread

* feat: add back node versions

disable deprecation notice
wrap async controllers in try/catch

* feat: use db directly

* feat: promisify in place

* fix: redis/psql

* feat: deprecation message

logs for psql

* feat: more logs

* feat: more logs

* feat: logs again

* feat: more logs

* fix: call release

* feat: restore travis, remove logs

* fix: loops

* feat: remove .async. usage
Barış Soner Uşaklı 035f624758
Remove implicit mod privs. closes ()
* feat: add upgrade script to give mods privs

* feat: give all privileges when making a moderator

* feat: remove implicit privs

* feat: give global mods default privs

* feat: more priv fixes

* feat: use lodash

* fix: remove implicit mod priv from topic delete

* fix: more privs

* fix: posts.canEdit

* fix: canDelete and canEdit

* fix: tests, remove console.log

* feat: shorter functions

* feat: add tests

* fix: uids

* fix: redis random test fail
Aziz Khoury 3fbb6faf28 feat: update unban logic/invocation and refactor User.bans module
* auto unban when User.getUsersFields is called and the user is banned but has expired

* cleanups and removal of expiry_readable

* expiry_readable make an alias for backward compatibility

* User.bans.func vs User.*ban*Func

* console.log cleanups, plus todo message added

* use code util.deprecate

* fix: remove ununsed winston require
Barış Soner Uşaklı c12e1d19a7 fix: tests
Baris Usakli 23da300958 feat: pass options to digest
Barış Soner Uşaklı eb7ae54f81
Category watch state ()
* feat: wip, category watch change

* feat: pass data to client

* feat: allow changing state

* fix: account page categories

* fix: show in unread if topic is followed or category is watched

* feat: add default watch state to acp

* feat: save user category watch state

* feat: update unread recent pages

* fix: remove dupe code

* fix: flip conditions

* fix: handle empty arrays

* fix: ignore/watch on others profile

* feat: upgrade script for category states

if there are any users ignoring categories set their state in new zset and delete cid:<cid>:ignorers

* fix: upgrade

* fix: tests

* fix: redis count

* fix: more tests
Barış Soner Uşaklı c27be9db5a
Recent refactor ()
* wip

* fix inf scroll

* remove duplicated code

* remove dupe code in /unread

* use topicList

* update tag page to use topicList

* fix tests

* combine ifs

* remove more dupe code

* disable timeout
Baris Usakli 566564ed74 fix redis tests
fixed typo in groups/data.js
added postcount,viewcount to int fields
Barış Soner Uşaklı fb6067a7ca only parse if field is requested
Barış Soner Uşaklı f3a679e268 remove parseInts
Barış Soner Uşaklı 537b7ff7e8 remove more parseInts
Baris Usakli a228dc2de9 closes
Barış Soner Uşaklı ac39112271 remove more parseInts
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
Barış Soner Uşaklı c06480b82e add tests for blocked users teaser/unread
Baris Usakli a867b77509 add assert message to test
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes ()
Barış Soner Uşaklı a7c4c59121 change to series