异世界红茶馆的源码
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Barış Soner Uşaklı 9b901783fa
Chat refactor (#11779)
* first part of chat refactor

remove per user chat zsets & store all mids in chat:room:<roomId>:mids
reverse uids in getUidsInRoom

* feat: create room button

public groups wip

* feat: public rooms

create chats:room zset
chat room deletion

* join socket.io room

* get rid of some calls that load all users in room

* dont load all users when loadRoom is called

* mange room users infinitescroll

dont load all members in api call

* IS for user list

ability to change groups field for public rooms
update groups field if group is renamed

* test: test fixes

* wip

* keep 150 messages

* fix extra awaits

fix dupe code in chat toggleReadState

* unread state for public rooms

* feat: faster push unread

* test: spec

* change base to harmony

* test: lint fixes

* fix language of chat with message

* add 2 methods for perf

messaging.getTeasers and getUsers(roomIds)
instead of loading one by one

* refactor: cleaner conditional

* test fix upgrade script fix

save timestamp of room creation in room object

* set progress.total

* don't check for guests/spiders

* public room unread fix

* add public unread counts

* mark read on send

* ignore instead of throwing

* doggy.gif

* fix: restore delete

* prevent entering chat rooms with

meta.enter

* fix self message causing mark unread

* ability to sort public rooms

* dont init sortable on mobile

* move chat-loaded class to core

* test: fix spec

* add missing keys

* use ajaxify

* refactor: store some refs

* fix: when user is deleted remove from public rooms as well

* feat: change how unread count is calculated

* get rid of cleaned content

get rid of mid

* add help text

* test: fix tests, add back mid

to prevent breaking change

* ability to search members of chat rooms

* remove

* derp

* perf: switch with  partial data

fix tests

* more fixes

if user leaves a group leave public rooms is he is no longer part of any of the groups that have access

fix the cache key used to get all public room ids

dont allow joining chat socket.io room if user is no longer part of group

* fix: lint

* fix: js error when trying to delete room after switching

* add isRoomPublic
2 years ago
.github chore(deps): update coverallsapp/github-action action to v2.2.0 (#11690) 2 years ago
.husky chore: bump deps (#9335) 4 years ago
.tx feat: update transifex config with new language strings 2 years ago
build endpoint to download user attachments, #6441 7 years ago
install Merge branch 'master' into develop 2 years ago
logs added daemon capability to ./nodebb start, npm start/stop scripts 11 years ago
public Chat refactor (#11779) 2 years ago
src Chat refactor (#11779) 2 years ago
test Chat refactor (#11779) 2 years ago
.codeclimate.yml style: give me an A! 💯 3 years ago
.editorconfig Fix editorconfig syntax 10 years ago
.eslintignore Bootstrap5 (#10894) 2 years ago
.eslintrc feat: replace eslint configs on server and client side to inherit rules from eslint-config-nodebb 3 years ago
.gitattributes #3343 10 years ago
.gitignore chore: add test.sh to gitignore 3 years ago
.mocharc.yml fix: remove deprecated mocha.opts 5 years ago
CHANGELOG.md chore: update changelog for v3.2.1 2 years ago
Dockerfile ci: multi-platform docker image (#11479) 2 years ago
Gruntfile.js Chat refactor (#11779) 2 years ago
LICENSE Resolving issue #2 -- added GPLv3 license file and updated package.json 12 years ago
README.md docs: update readme with new screenshot and updated copy for Harmony 2 years ago
app.js feat: Allow defining active plugins in config (#10767) 3 years ago
commitlint.config.js fix: updated commitlint config to allow longer subjects, because nobody anywhere uses an email client that limits subject lines to 72 characters 4 years ago
docker-compose.yml Add docker-compose.yml (#7966) 5 years ago
loader.js feat: update mkdirp to 3.x, closes #11455 2 years ago
nodebb CLI refactor with commander (#6058) 7 years ago
nodebb.bat Fix #7263 (#7264) 6 years ago
renovate.json chore: have renovate work off of `develop` branch instead 3 years ago
require-main.js Enable `require.main.require` in tests (#6896) 6 years ago
webpack.common.js fix: closes #11473, kudos to @pitaj 2 years ago
webpack.dev.js Bootstrap5 (#10894) 2 years ago
webpack.installer.js Webpack5 (#10311) 3 years ago
webpack.prod.js show progress 2 years ago

README.md

NodeBB

Workflow Coverage Status Code Climate

NodeBB Forum Software is powered by Node.js and supports either Redis, MongoDB, or a PostgreSQL database. It utilizes web sockets for instant interactions and real-time notifications. NodeBB takes the best of the modern web: real-time streaming discussions, mobile responsiveness, and rich RESTful read/write APIs, while staying true to the original bulletin board/forum format → categorical hierarchies, local user accounts, and asynchronous messaging.

NodeBB by itself contains a "common core" of basic functionality, while additional functionality and integrations are enabled through the use of third-party plugins.

Try it now | Documentation

Screenshots

NodeBB's theming engine is highly flexible and does not restrict your design choices. Check out some themed installs in these screenshots below:

Our minimalist "Harmony" theme gets you going right away, no coding experience required.

Rendering of a NodeBB install on desktop and mobile devices

How can I follow along/contribute?

  • If you are a developer, feel free to check out the source and submit pull requests. We also have a wide array of plugins which would be a great starting point for learning the codebase.
  • If you are a designer, NodeBB needs themes! NodeBB's theming system allows extension of the base templates as well as styling via SCSS or CSS. NodeBB's base theme utilizes Bootstrap 5 as a frontend toolkit.
  • If you know languages other than English you can help us translate NodeBB. We use Transifex for internationalization.
  • Please don't forget to like, follow, and star our repo! Join our growing community to keep up to date with the latest NodeBB development.

Requirements

NodeBB requires the following software to be installed:

  • A version of Node.js at least 16 or greater (installation/upgrade instructions)
  • MongoDB, version 3.6 or greater or Redis, version 2.8.9 or greater
  • If you are using clustering you need Redis installed and configured.
  • nginx, version 1.3.13 or greater (only if intending to use nginx to proxy requests to a NodeBB)

Installation

Please refer to platform-specific installation documentation

Securing NodeBB

It is important to ensure that your NodeBB and database servers are secured. Bear these points in mind:

  1. While some distributions set up Redis with a more restrictive configuration, Redis by default listens to all interfaces, which is especially dangerous when a server is open to the public. Some suggestions:
    • Set bind_address to 127.0.0.1 so as to restrict access to the local machine only
    • Use requirepass to secure Redis behind a password (preferably a long one)
    • Familiarise yourself with Redis Security
  2. Use iptables to secure your server from unintended open ports. In Ubuntu, ufw provides a friendlier interface to working with iptables.
    • e.g. If your NodeBB is proxied, no ports should be open except 80 (and possibly 22, for SSH access)

Upgrading NodeBB

Detailed upgrade instructions are listed in Upgrading NodeBB

License

NodeBB is licensed under the GNU General Public License v3 (GPL-3) (http://www.gnu.org/copyleft/gpl.html).

Interested in a sublicense agreement for use of NodeBB in a non-free/restrictive environment? Contact us at sales@nodebb.org.