117 Commits (05ddd60c5e257b3773b400ae5aec18b157ce3856)

Author SHA1 Message Date
Barış Soner Uşaklı 2657804c1f fix: #9790, fix sorting of more than one page of pinned topics 3 years ago
Barış Soner Uşaklı 4a56388ec3
feat: store topic tags in topic hash (#9656)
* feat: store topic tags in topic hash

breaking: remove color info from tags (use css)

* fix: remove unused tag modal

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

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

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
4 years ago
Barış Soner Uşaklı eb360351e5 fix: #9394, fix guest handles 4 years ago
Barış Soner Uşaklı 0e07f3c9ba feat: allow defining a list of system tags 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 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ı 647d3ba810 fix: removed methods 4 years ago
Barış Soner Uşaklı d2888d1d1f
Category tags (#8938)
* 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
4 years ago
Barış Soner Uşaklı 3cd0c9a476 fix: #8998, allow guests to use write api to post/reply 4 years ago
Barış Soner Uşaklı 5bb5ec4618
fix: #8954, clear purged replies and toPids (#8959)
* fix: #8954, clear purged replies and toPids

* fix: redis test
4 years ago
Barış Soner Uşaklı fa4177c3bc fix: #6407, 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
4 years ago
Barış Soner Uşaklı c718b7293e feat: #3783, min/max tags per category 5 years ago
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
5 years ago
Barış Soner Uşaklı ec5582b53c
feat: add privilege give/rescind hooks (#8336)
* 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
5 years ago
Barış Soner Uşaklı 81e33b9391 fix: #8317 5 years ago
Barış Soner Uşaklı bfad457275 feat: add methods for adding/removing tags from topics 5 years ago
Julian Lam ccc6118d30
Testing suite integration for openapi spec (#8263)
* 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ı <[email protected]>
5 years ago
Barış Soner Uşaklı 8c48f94b96 fix: #8139, dont allow restore if not deleted by self 5 years ago
Barış Soner Uşaklı 10989cccaa fix: meta description missing if url doesn't have post index 5 years ago
Barış Soner Uşaklı 661a0f5068 fix: don't show deleted topics on unread 5 years ago
Barış Soner Uşaklı 6fb29e8408 fix: tests 5 years ago
Barış Soner Uşaklı 310c6fd33f
properly filter /unread /recent /popular /top (#7927)
* 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
5 years ago
Baris Usakli ecf39727cc fix: #7912 5 years ago
Barış Soner Uşaklı 805dcd7ca2
Async refactor in place (#7736)
* 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
6 years ago
Barış Soner Uşaklı 035f624758
Remove implicit mod privs. closes #6345 (#7648)
* 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
6 years ago
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
6 years ago
Barış Soner Uşaklı c12e1d19a7 fix: tests 6 years ago
Baris Usakli 23da300958 feat: pass options to digest 6 years ago
Barış Soner Uşaklı eb7ae54f81
Category watch state (#7109)
* 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
6 years ago
Barış Soner Uşaklı c27be9db5a
Recent refactor (#6879)
* 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
6 years ago
Baris Usakli 566564ed74 fix redis tests
fixed typo in groups/data.js
added postcount,viewcount to int fields
6 years ago
Barış Soner Uşaklı fb6067a7ca only parse if field is requested 6 years ago
Barış Soner Uşaklı f3a679e268 remove parseInts 6 years ago
Barış Soner Uşaklı 537b7ff7e8 remove more parseInts 6 years ago
Baris Usakli a228dc2de9 closes #6797 6 years ago
Barış Soner Uşaklı ac39112271 remove more parseInts 6 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
6 years ago
Barış Soner Uşaklı c06480b82e add tests for blocked users teaser/unread 6 years ago
Baris Usakli a867b77509 add assert message to test 6 years ago
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes #6823 (#6827) 6 years ago