Messenger
Node.js Open-Source Slack alternative
Install / Use
/learn @totaljs/MessengerREADME
Installation
- Install Node.js platform
- Install GraphicsMagick
- Install latest version of Total.js
$ npm install total.js - License: MIT
- Live chat with professional support
- HelpDesk with professional support
First start
- set up configuration file
/config - run
$ node debug.js(development) or$ node release.js(production) - open
http://127.0.0.1:8000/ - sign in user:
info@totaljs.com, password:123456(credentials are stored in/databases/users.json)
How do I translate Messenger?
- install Total.js as global module
npm install -g total.js - then open Messenger directory
cd messenger - then perform this command
totaljs --translate - translate translated file
translate.resource - and copy the content to
/resources/default.resource - run app
How can I extend messenger independently?
Server-side
F.on('messenger.open', function(controller, client) {
// open client
});
F.on('messenger.close', function(controller, client) {
// disconnected client
});
F.on('messenger.data', function(controller, client, data) {
// RAW data from websocket
// data === OBJECT
});
F.on('messenger.message', function(controller, client, message) {
// New message
// message === OBJECT
});
// How to send a message?
options = {};
// REQUIRED
options.iduser = 'ID USER WHICH SENDS MESSAGE';
options.target = 'channel'; // or "user"
options.idtarget = 'idchannel' // or "iduser"
options.body = 'MARKDOWN MESSAGE'; // how to perform like? just send ":thumbs-up:" in body
options.secret = false; // is the message a secret message?
// OPTIONAL
options.id = 'ID MESSAGE'; // for editing of an existing message
options.users = ['iduser1', 'iduser2']; // optional, which users can by notified? (works with channels only)
options.files = [{ name: 'filename', url: 'url to download' }]; // optional, (it serves for file browser only)
OPERATION('send', options, function(err, response) {
console.log('DONE');
});
Client-side
ON('messager.ready', function() {
// messenger is ready
});
ON('messenger.message', function(message) {
// message === OBJECT
});
ON('messenger.send', function(message) {
});
// You can register event
ON('messenger.render', function(message) {
// message.message - instance of retrieved message
// message.html - rendered HTML (can be modified)
// Example:
message.html = message.html.replace(/\,/g, ' --- ');
});
// How to send a message to the server via WebSocket?
SETTER('websocket', 'send', OBJECT);
HTML Formatting
+v2.0.0. Administrators have disabled xss protection, so each admin can inject a raw HTML into the markdown directly, example:
Only administrators can inject HTML directly via:
\```xss
<b>THIS WILL BE BOLDED</b>
\```
Contributors
- Peter Širka (author) petersirka@gmail.com
- Martin Smola (support) smola.martin@gmail.com
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

