Commit Graph

107 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
0e07f3c9ba feat: allow defining a list of system tags 2021-02-17 14:44:04 -05:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
23f212a4c0 chore: eslint prefer-destructuring 2021-02-08 18:06:44 -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
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Barış Soner Uşaklı
647d3ba810 fix: removed methods 2021-01-27 17:36:58 -05:00
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
2020-12-06 12:36:40 -05:00
Barış Soner Uşaklı
3cd0c9a476 fix: #8998, allow guests to use write api to post/reply 2020-11-29 15:43:40 -05:00
Barış Soner Uşaklı
5bb5ec4618 fix: #8954, clear purged replies and toPids (#8959)
* fix: #8954, clear purged replies and toPids

* fix: redis test
2020-11-26 12:04:01 -05:00
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
2020-11-18 14:25:39 -05:00
Barış Soner Uşaklı
c718b7293e feat: #3783, min/max tags per category 2020-06-24 16:02:57 -04:00
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
2020-06-10 12:48:32 -04:00
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
2020-05-26 21:57:38 -04:00
Barış Soner Uşaklı
81e33b9391 fix: #8317 2020-05-15 22:10:50 -04:00
Barış Soner Uşaklı
bfad457275 feat: add methods for adding/removing tags from topics 2020-05-12 23:00:45 -04:00
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ı <barisusakli@gmail.com>
2020-04-23 21:50:08 -04:00
Barış Soner Uşaklı
8c48f94b96 fix: #8139, dont allow restore if not deleted by self 2020-01-28 13:03:58 -05:00
Barış Soner Uşaklı
10989cccaa fix: meta description missing if url doesn't have post index 2019-12-30 22:19:00 -05:00
Barış Soner Uşaklı
661a0f5068 fix: don't show deleted topics on unread 2019-10-09 18:03:07 -04:00
Barış Soner Uşaklı
6fb29e8408 fix: tests 2019-10-07 12:46:48 -04:00
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
2019-09-26 21:55:49 -04:00
Baris Usakli
ecf39727cc fix: #7912 2019-09-20 11:44:49 -04:00
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 cea206a9b8.

* 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
2019-07-09 12:46:49 -04:00
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
2019-05-30 19:30:47 -04:00
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
2019-04-05 14:14:48 -04:00
Barış Soner Uşaklı
c12e1d19a7 fix: tests 2019-03-19 11:51:40 -04:00
Baris Usakli
23da300958 feat: pass options to digest 2019-02-22 14:39:05 -05:00
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
2018-12-14 16:24:17 -05:00
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
2018-10-27 06:26:50 -04:00
Baris Usakli
566564ed74 fix redis tests
fixed typo in groups/data.js
added postcount,viewcount to int fields
2018-10-26 13:01:34 -04:00
Barış Soner Uşaklı
fb6067a7ca only parse if field is requested 2018-10-25 19:58:01 -04:00
Barış Soner Uşaklı
f3a679e268 remove parseInts 2018-10-25 17:02:59 -04:00
Barış Soner Uşaklı
537b7ff7e8 remove more parseInts 2018-10-23 21:36:00 -04:00
Baris Usakli
a228dc2de9 closes #6797 2018-10-23 17:50:44 -04:00
Barış Soner Uşaklı
ac39112271 remove more parseInts 2018-10-21 19:33:46 -04:00
Barış Soner Uşaklı
26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
2018-10-20 14:40:48 -04:00
Barış Soner Uşaklı
c06480b82e add tests for blocked users teaser/unread 2018-10-15 11:09:57 -04:00
Baris Usakli
a867b77509 add assert message to test 2018-10-12 12:58:11 -04:00
Barış Soner Uşaklı
5c7dd54815 fix zsets and update them on post move, closes #6823 (#6827) 2018-10-11 16:00:22 -04:00
Barış Soner Uşaklı
a7c4c59121 change to series 2018-10-04 14:07:24 -04:00
Barış Soner Uşaklı
805da98a36 remove unnecessary groups.resetCache calls 2018-09-30 13:42:33 -04:00
Barış Soner Uşaklı
944972c6f2 change to series 2018-09-28 23:57:00 -04:00
Barış Soner Uşaklı
1cb2e1e368 remove console.log switch to series 2018-09-26 10:56:19 -04:00
Barış Soner Uşaklı
f618ba8e1e add private category test for unread tids 2018-09-25 12:07:56 -04:00
Barış Soner Uşaklı
ccad95cf73 closes #6579 2018-06-18 14:37:37 -04:00
Barış Soner Uşaklı
2fd2accf8c add tests for top topics
fix popular page displaying 18 topics per page
2018-06-15 15:23:30 -04:00
Barış Soner Uşaklı
4684ab3bf6 suggest topic test 2018-06-14 17:55:19 -04:00
Barış Soner Uşaklı
505e511e4d fix tests 2018-04-25 13:21:39 -04:00
Barış Soner Uşaklı
f3fda152bf closes #6216 2018-01-16 18:20:57 -05:00