Commit Graph

840 Commits (8e5a2276afe929fa321574db80b99643e1ad5bb0)

Author SHA1 Message Date
Baris Usakli 0c1ac4d6a2 feat:
Barış Soner Uşaklı fef7e13c9e feat: small fixes
Barış Soner Uşaklı 99e0895e99 fix: move the check to get methods
all .post methods will have csrf
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ı 263c918088
feat: remove uid:<uid>:ignored:cids ()
use cid:<cid>:ignorers instead
Barış Soner Uşaklı 26ccd8f626 fix: db info page
if there is no connection to db, connect first
Barış Soner Uşaklı 81aa3a0b8a fix: don't crash in flags.validate if user blocked target
Barış Soner Uşaklı e55fb43703 fix:
Baris Usakli e65d40c937 dont return undefined from sortedSetsCard if keys is empty or falsy
Baris Usakli 76af8caf58 add missing semicolon
Baris Usakli 420227faae parseFloat scores
Julian Lam 5f3d1c76c8
fix: , autoLocale logic not playing nicely with no-refresh auths ()
* fix: , autoLocale logic not playing nicely with no-refresh auths

- on login, req.query.lang is deleted (since it seems to be left over)
- on logout, the middleware.autoLocale is executed, which resets
  req.query.lang
- middleware.autoLocale is new, just refactored existing logic in
  webserver.js into new middleware method.

* style: tests, use lodash

* fix: timeago strings not switching languages on login or out
Baris Usakli d3c6cba33f closes
Barış Soner Uşaklı a63ddbe2aa fix:
if category doesn't exist return null and 404
Barış Soner Uşaklı 1f918ca8f8
Home route ()
* fix: WIP home fix

* remove console.log

* fix: 

on redis run all tests in subfolder /forum
fix URI errors
fix sping/ping
Baris Usakli cd46febdd0 fix lint
Baris Usakli b86f155690 fix:
Peter Jaszkowiak ba619c7ec8 style(eslint): match operator-linebreak preferences
Barış Soner Uşaklı 00a066985a cache categories:cid and cid:<cid>:children
these rarely change, no need to go to db for them
Barış Soner Uşaklı c240733aee fix logs test
Barış Soner Uşaklı 0361849bb1 check status code
Barış Soner Uşaklı 47b2057f20
Barış Soner Uşaklı 53ad2bbd6e
Categories optimize ()
* WIP

* fix category page

* fix counts, and copyPrivileges

* fix lint

* more fixes,

* redis fix

* fix test

* fix  category test

* remove getParentsAndChildren
Barış Soner Uşaklı 9d28b935fd dont load uid 0, -1 from db
Barış Soner Uşaklı a6864a8055 add groupTitle test for guests
Barış Soner Uşaklı ca1e3a758b
Baris Usakli b83e50f286 remove delayImageLoading from api @julianlam
Barış Soner Uşaklı afa84023a2 closes
Barış Soner Uşaklı f8e219c323 handle empty set, add test
Barış Soner Uşaklı b6771836cf closes
Baris Usakli 62787368c6 add searchonly option to searh api
Julian Lam da10ca084b fix: , allow square brackets in usernames
renovate[bot] 64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 ()
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: , linting 😬
Barış Soner Uşaklı 75816deca7
add cache to redis ()
* add cache to redis

move out cache module from mongo

* fix redis tests

* add callback noop

* fix typo

* del cache on field delete

* make redis/mongo caches separate
Julian Lam 501b3a79ca
Refactor skins to be built on server-side ()
* WIP

* using bootswatch from npm instead of bootswatch CDN url

* feat: on-demand client css building for skins

* added ability for client-side to select a skin

* updated loading and saving logic of bootstrapSkin on client side user settings

* fix: broken test for 
Baris Usakli 3c611d85ed closes
- on category setParent dialog do not show children of current category
- break recursion if category parentCid is equal to child cid to prevent
infinite loop
- dont allow setting the parentCid of a category to one of it's children
Peter Jaszkowiak 9a32118418 Enable `require.main.require` in tests ()
Barış Soner Uşaklı d3e4daebec posts/delete cleanup
Barış Soner Uşaklı 7aa937a657 remove dupe code in mongodb sorted
Barış Soner Uşaklı ea1e8fb8fe Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 19e6c61244 add new test for queue
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ı 9c03881d5a add threshold for image resizing
Barış Soner Uşaklı 537b7ff7e8 remove more parseInts
Baris Usakli a228dc2de9 closes
Barış Soner Uşaklı 175e13edf6 group data
Barış Soner Uşaklı c30ff42817 test for hooks page
Barış Soner Uşaklı c738dc7d3e remove some more parseInts
Barış Soner Uşaklı 7a44424214 parse '123' to 123 if it has no default
Barış Soner Uşaklı d07e3e6d97 if not in defaults use string
Barış Soner Uşaklı 4fff5e9baf closes
Barış Soner Uşaklı ac39112271 remove more parseInts
Barış Soner Uşaklı 9c022afae1
Parse int ()
* Store config fields as JSON in the db

Fewer parseInts

* Remove unnecessary parseInts

* remove some dupe code add tests

* remove console.log

* remove more parseInts

* WIP: read meta.configs defaults from defaults.json

remove more parseInts

* more work

* add log for failing test

* update admin pwd

* fix tests, dont require posts/cache before configs are initialized

* handle saves

* Test boolean conditions

* remove more parseInts

* Fix boolean values

* remove lots more parseInts

* removed json parsing

* renamed var to number

* categories dont have timestamp
Barış Soner Uşaklı ee2f9e9434 remove some parseInts
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
Barış Soner Uşaklı 038f97b0f5 more settings tests
Barış Soner Uşaklı 8c9754ecee add test for /admin/settings/user
Barış Soner Uşaklı 250e8c01ff closes
Barış Soner Uşaklı da1a90a470 add search test
Baris Usakli baf91089a6 remove unused methods
Baris Usakli 74fdadf8a6 test pubsub cache
Baris Usakli 444fd70ba3 test pubsub
Barış Soner Uşaklı 986511e718 try with higher timeout
Barış Soner Uşaklı 1d15dc089b revert isCluster
Barış Soner Uşaklı aa567a5f2d print out connString and opts
Barış Soner Uşaklı 38ce83304d up widget essentials
Barış Soner Uşaklı 2d8d234c57 test mongodb again
Barış Soner Uşaklı 8f7482955d set cluster to false again
Barış Soner Uşaklı fd31ad3cfe disable busy check on tests
Barış Soner Uşaklı f4df89fe90 closes
Barış Soner Uşaklı 5dbc7f032a reset post cache between each suite
Barış Soner Uşaklı fc68263f91 change to TEST_ENV
Barış Soner Uşaklı 45b6e56665 add node_env to tests
Barış Soner Uşaklı 85c60316ed
upgrade to winston 3.1, closes ()
* upgrade to winston 3.1

* fix winston in web/install and tests
Barış Soner Uşaklı b57db7fd8e
update groups join to take array of group names ()
* allow groups.join to take an array of group names

* pass an array to groups.join/leave in privileges

* split up groups/membership

* add hits/miss to group cache

* fix typo
Barış Soner Uşaklı c06480b82e add tests for blocked users teaser/unread
Barış Soner Uşaklı d4db8c2d42 removed reset
Barış Soner Uşaklı 1024a0efa1 add reset to pubsub for tests
Baris Usakli 7d8fc09226 add test for pubsub
Baris Usakli 28f2144933 remove time out on plugin upgrade test
Baris Usakli a867b77509 add assert message to test
Barış Soner Uşaklı e615391b22 convert values to string before removing
Barış Soner Uşaklı 5c7dd54815
fix zsets and update them on post move, closes ()
Baris Usakli 5f49a1d82c disable timeout on build templates
Baris Usakli 9ed4239d8e small changes and test for user/:slug/categories
Barış Soner Uşaklı b58ab48485 add test for /sessions controller
Barış Soner Uşaklı a7c4c59121 change to series
Barış Soner Uşaklı 1bea247748 add username/email to user-delete event
Barış Soner Uşaklı f77091d1ed change user delete so it returns quickly
Barış Soner Uşaklı 805da98a36 remove unnecessary groups.resetCache calls
Barış Soner Uşaklı 061b279c48 Merge branch 'master' of https://github.com/NodeBB/NodeBB
Barış Soner Uşaklı 77beaf2e15
Allow local login,closes ()
* WIP

* reset groups cache after every suite
Barış Soner Uşaklı 2bd02a7ae1 disable timeout on plugin installs
Barış Soner Uşaklı 944972c6f2 change to series
Barış Soner Uşaklı 18d0deeccb
update deprecated methods ()
Barış Soner Uşaklı 1cb2e1e368 remove console.log switch to series
Barış Soner Uşaklı f618ba8e1e add private category test for unread tids
Barış Soner Uşaklı 95501e8fee
closes closes ()
* closes  closes 

* fix test, delete keys

* delete all bans on user delete

* fix upgrade script to actually read reason
Barış Soner Uşaklı 59b988a205 change test so it checks url
Barış Soner Uşaklı b7ead6dc9c
Replace jimp with sharp ()
* add probe image size and max image size

* replace jimp and image-probe with sharp

* better name for test

* resize with just path

* resize thumb inplace

* use filename
Barış Soner Uşaklı ea1697d073 remove console.log
Barış Soner Uşaklı 25fed0aa8d change isPasswordCorrect to return false if user does not have password
Barış Soner Uşaklı 2a2e8136cd
fix tests
Ben Lubar 33228bb7fe PostgreSQL database driver ()
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
Barış Soner Uşaklı fa499aef18 closes
Baris Usakli 546b13b897 fix lint and tests
Barış Soner Uşaklı c7d6cacd98 closes
Peter Jaszkowiak 04d31fe1d4 Precompile all templates
- Benchpress compilation is 33x faster now
- Native module with JS fallback and pre-built binaries
- Dev template build is <1sec now
- Minified template build is ~5sec (uglify accounts for almost all)
Barış Soner Uşaklı 3449cf321b add back cache and pubsub
Barış Soner Uşaklı ae0563375e derp
Baris Usakli 584f88e092 blocks WIP
Baris Usakli be1e83bfc1 fix tests
Barış Soner Uşaklı 82b2a20d0c user tests
Barış Soner Uşaklı ccad95cf73 closes
Barış Soner Uşaklı 2fd2accf8c add tests for top topics
fix popular page displaying 18 topics per page
Barış Soner Uşaklı 4684ab3bf6 suggest topic test
Barış Soner Uşaklı c3fc4a06bf test sortedSetUnion with scores
Julian Lam 8d41e319ea fixed tests
Julian Lam 8e832abf1e additional tests for post diffs privilege checking
Julian Lam 510dd268cc fix tests
Barış Soner Uşaklı 14f6e74bad closes
Barış Soner Uşaklı a7267df404 closes
Barış Soner Uşaklı 4504bbae52 2 diff test
Barış Soner Uşaklı 229e49cf8f closes , closes
Barış Soner Uşaklı 65dc530df5 some controller tests
Barış Soner Uşaklı d977934c66 adjust username test
Barış Soner Uşaklı 8e8058ec6e closes
Julian Lam 445b92ae38 Revert "fix some tests"
This reverts commit 2551df80f7.
Barış Soner Uşaklı cdc3ef09e9 closes
Julian Lam 2551df80f7 fix some tests
Barış Soner Uşaklı 9132743870
Julian Lam 5dc25a3c00 Merge remote-tracking branch 'origin/master' into chat-kick-support
Julian Lam a08572b800 kick support for chats,
Barış Soner Uşaklı beadcd7857 fix tests, remove dupe exposeUid
Julian Lam dc386b5b23 Merge branch 'master' into user-blocking
Julian Lam a0643b63df uncommenting tests again
Julian Lam 8db98b5cf4 additional UCP integration for
Barış Soner Uşaklı bc18b489e6 fix group test
Barış Soner Uşaklı 9ae5946e7a Merge remote-tracking branch 'refs/remotes/origin/master' into develop
Julian Lam 3951bb9532 Merge remote-tracking branch 'origin/master' into user-blocking
Barış Soner Uşaklı 505e511e4d fix tests
Julian Lam 322d8236d2 added test for User.blocks.is, re:
Julian Lam 032ec8b443 tests!!! glorious tests!!!
re: 
Julian Lam 1f1e055509 updated post association code to only associate files that exist, closes
Julian Lam 0f13ae3c87 added isOrphan method,
Julian Lam 2e125293e6 save reverse association of md5 of upload to pid,
Julian Lam 850f59a1ae additional functionality, integration, and testing for