288 Commits (f0775651b96cbdfddb579ff27ee59c9245ef427e)

Author SHA1 Message Date
Barış Soner Uşaklı b734defbfa feat: rewrite getRawPost to async/await
promisify SocketPosts
6 years ago
Barış Soner Uşaklı 44a3352003 fix: socket.io methods calling callbacks twice if method returns promise 6 years ago
Julian Lam aee47b299a
feat: awaitable websockets (#7645)
* feat: awaitable websockets

Adding in conditionals to check the method to call, and handling
it as a promise vs. a regular function depending on whether the
method itself is an asynchronous function.

* fix: switch to .then-checking for awaitable check

* fix: proper use of .then check
6 years ago
Julian Lam 0263b4daec
feat: added new hook `static:sockets.validateSession` (#7189)
* feat: added new hook

* fix: improper .bind() call, +req in static:sockets.validateSession

* fix: restored original sessionStore logic, +hook

original logic to retrieve the sessionStore was not faulty, but
was changed for the sake of changing things, which ultimately
led to issues with tests, etc.
6 years ago
Peter Jaszkowiak 89c025d102 feat: close #7002, console message if mismatched origins 6 years ago
renovate[bot] 64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: #6599, linting 😬
7 years ago
Barış Soner Uşaklı 9c022afae1
Parse int (#6853)
* 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
7 years ago
Ben Lubar cf4ea94e6d Fix single-host-cluster socket.io (#6802)
It was silently dropping every message because every node thought it was the master node.
7 years ago
Ben Lubar 44373afc52 Fix socket.io not working properly in single-host clusters. (#6669)
This is because we don't use the cluster module, so the master nodejs process doesn't know about any of the clients through the socket API.
7 years ago
Ben Lubar c1e98eefa7 Allow single-host clusters to not send pubsub and socket.io messages through the database. (#6659)
* Allow single-host clusters to not send pubsub and socket.io messages through the database.

* Fix lint errors.
7 years ago
Barış Soner Uşaklı a37dc1856f #6561 7 years ago
Julian Lam c25d752573 Merge remote-tracking branch 'origin/master' into develop 7 years ago
Julian Lam a4a961639d only triggering forum updated messaging if hostname matches, fixes #6333 7 years ago
Ben Lubar e85aabbe74 Allow running as a cluster without Redis (#6233)
* [database/*] Allow databases other than Redis to provide pubsub for clustering if Redis is not present

* [pubsub] Delay messages sent before the database is ready until the database is ready.

* [pubsub] Restore old behavior of not using the database in non-clustered NodeBB instances.

See comment: https://github.com/NodeBB/NodeBB/pull/6233#issuecomment-357814968
7 years ago
Julian Lam 73d4517d27 Revert "fixes #5894"
This reverts commit e2b40ddf34.
8 years ago
Baris Usakli 19ae2b3eb4 dont join online_users and uid_ if user does not exist 8 years ago
Baris Usakli 0d0ea0977f check error 8 years ago
Julian Lam e2b40ddf34 fixes #5894 8 years ago
Barış Soner Uşaklı e56178f72e remove init socket.io 8 years ago
Barış Soner Uşaklı c0807ab327 closes #5639 8 years ago
Julian Lam 69dd1e3aca Merge branch 'master' into develop 8 years ago
Julian Lam 33bf930bb9 fixes #5528 8 years ago
Julian Lam 72e77772db Merge branch 'master' into develop 8 years ago
Peter Jaszkowiak dd2b930824 Resolve merge conflicts, minify only `.js` files 8 years ago
Julian Lam a9f144230e Merge branch 'master' into develop 8 years ago
Julian Lam 25f6293821 using io.origins instead 8 years ago
Julian Lam 91d3ce1abc Revert "adding origin to new local ioConfig var, as per @barisusakli, re: #5472"
This reverts commit c1b1ff5c6e.
8 years ago
Julian Lam a4c00663ff Revert "adding origin to new local ioConfig var, as per @barisusakli, re: #5472"
This reverts commit c1b1ff5c6e.
8 years ago
Julian Lam 8154e29ad5 Merge branch 'master' into develop 8 years ago
Julian Lam c1b1ff5c6e adding origin to new local ioConfig var, as per @barisusakli, re: #5472 8 years ago
Julian Lam 672d7352bb Merge branch 'master' into develop 8 years ago
Julian Lam d4c2fc3bc8 closes #5472 8 years ago
Peter Jaszkowiak 09e868ce5f ESlint no-useless-escape, no-else-return 8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak 52f2028206 ESlint no-multiple-empty-lines 8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
Julian Lam eae541d040 Merge branch 'master' into develop 8 years ago
Ben Lubar 9fb16e3520
Fix forum instances using Redis dropping socket.io messages.
Bug introduced in b08acd197c.

https://github.com/socketio/socket.io-redis/releases/tag/3.0.0
https://github.com/socketio/socket.io-redis/issues/185
8 years ago
Julian Lam b5daedb7a3 Merge remote-tracking branch 'origin/master' into develop 8 years ago
barisusakli a15aaaf389 closes #5394
dont allow socket.emits during maintenance mode
8 years ago
Julian Lam d9d60c20bd flag updating and note appending, #5232 9 years ago
Julian Lam ede7a71db7 Fixes #5186
On socket.io connection, all clients join a room pertaining to
their express session id. We use this room to keep track of any
sessions in different browser windows (but the same cookie jar),
so if a login/logout occurs, we can throw a session mismatch
modal.

This room can also be used to emit messages across windows/tabs...
9 years ago
barisusakli ee75c69817 post edit tests 9 years ago
barisusakli 1a63672e66 more test fixes 9 years ago
barisusakli 12f366f4b4 more tests
register/login/logout tests
ability to test socket.io emits for logged in users
9 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
HeeL 9a0d764bbd Fix wrap-iife linter rule 9 years ago
barisusakli 4eb8015017 closes #5069 9 years ago
barisusakli 80c98e5ecf closes #4989 9 years ago
Julian Lam e26166a45b closes #4950 9 years ago
barisusakli 98d17a0589 fix tab 9 years ago
akhoury 46a57f5d5c rm cls because it's not ready yet 9 years ago
Julian Lam 0a1dea09a0 added missing dependency lib 9 years ago
Julian Lam 85fb9cd9dc in cases where host is not provided in the websocket request, infer one from the referer 9 years ago
Aziz Khoury 3dc63438de hmm-2 ... 9 years ago
Aziz Khoury aac30cb5ec hmm .. 9 years ago
Aziz Khoury 8920c95281 reqFromSocket now support payload and event and uid 9 years ago
Aziz Khoury c07e29bad6 fix circular dependency -- involves indentations fix 9 years ago
Aziz Khoury 807e3a9d7e adding cls back in socketio index 9 years ago
Aziz Khoury 4f3a962f7f what did i do? 9 years ago
Aziz Khoury 01ee020750 bring back disconnect only for CLS purposes 9 years ago
Aziz Khoury 53e9627001 unify request as a store key for both http and websockets calls 9 years ago
barisusakli b6e22b7723 closes #4367 9 years ago
barisusakli 596e5676ff remove status change 9 years ago
barisusakli c9ac1a4027 https://github.com/akhoury/nodebb-plugin-spam-be-gone/issues/46 9 years ago
barisusakli 0b2f01b8bc info page 9 years ago
Barış Soner Uşaklı b147f42f0a show unique user count in acp 9 years ago
barisusakli 7ca7a31a5a only send user status on first connect 9 years ago
akhoury a8411d44fd merge 9 years ago
akhoury 07586c9023 merge 9 years ago
barisusakli 92fba4f396 closes #4248 9 years ago
akhoury 4245cb2739 adding cls support for ws 9 years ago
barisusakli 83cb916264 closes #4038 9 years ago
barisusakli a6074da17e closes #4032 9 years ago
barisusakli 670ed38d75 missing semicolons 10 years ago
barisusakli 7ed378b367 removed override no longer needed 10 years ago
barisusakli 46c2563164 removed rooms.js removed browsing users, removed chat syncing across sockets
use lastonline for online detection
10 years ago
barisusakli 1ecf27417a removed commented out stuff removed topics.enter 10 years ago
barisusakli 491a6d0234 Merge remote-tracking branch 'refs/remotes/origin/master' into room-optimize 10 years ago
barisusakli 0d23c56281 removed event:disconnect 10 years ago
barisusakli bac2a0d959 removed event:connect use socket.io connect event duh 10 years ago
barisusakli 5879185ebc single proc stats 10 years ago
barisusakli 0199ed27a6 disable user_leave for topic 10 years ago
barisusakli be86c74c91 disabled browsing users and global rooms syncing 10 years ago
barisusakli f4bfcc7351 removed icon:bgColor and icon:text from db calls
calculates from username on the fly
10 years ago
Julian Lam b52475c270 Merge remote-tracking branch 'origin/master' into user-icons
Conflicts:
	public/src/client/account/edit.js
	src/middleware/middleware.js
	src/socket.io/meta.js
	src/socket.io/user/picture.js
	src/user.js
	src/views/admin/manage/group.tpl
10 years ago
barisusakli 85d09ce2e4 removed unsused require 10 years ago
Julian Lam f6d5b52a8b WIP user-icons 10 years ago
barisusakli 5950f97f96 more refactors 10 years ago
barisusakli 4a06750ae2 io.in logger 10 years ago
barisusakli c4b258c747 added .before to socket.io/groups.js 10 years ago
barisusakli dc7839b511 small fix 10 years ago
barisusakli daf1a388eb closes #3039 10 years ago
Barış Soner Uşaklı c9b98306e0 dont require everything in folder
dont want rooms.js to be public
10 years ago
barisusakli 77e956861a #2486
various fixes for socket.io cluster
display user presence correctly
10 years ago
Barış Soner Uşaklı 07572b188b fix crash 10 years ago
barisusakli 558e708576 remove console.log 10 years ago
Barış Soner Uşaklı e5343b7efc dont display cluster warning if not running as cluster 10 years ago
Barış Soner Uşaklı 8eb45fc80a dont remove self from browsing 10 years ago