mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-09 02:37:01 +02:00
Merge remote-tracking branch 'origin' into notifications
Conflicts: public/css/style.less public/src/app.js src/websockets.js
This commit is contained in:
@@ -8,7 +8,9 @@ var SocketIO = require('socket.io').listen(global.server,{log:false}),
|
||||
utils = require('./utils.js'),
|
||||
topics = require('./topics.js'),
|
||||
categories = require('./categories.js'),
|
||||
notifications = require('./notifications.js');
|
||||
notifications = require('./notifications.js'),
|
||||
threadTools = require('./threadTools.js'),
|
||||
postTools = require('./postTools.js');
|
||||
|
||||
(function(io) {
|
||||
var users = {},
|
||||
@@ -189,27 +191,31 @@ var SocketIO = require('socket.io').listen(global.server,{log:false}),
|
||||
});
|
||||
|
||||
socket.on('api:topic.delete', function(data) {
|
||||
topics.delete(data.tid, uid, socket);
|
||||
threadTools.delete(data.tid, uid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:topic.restore', function(data) {
|
||||
topics.restore(data.tid, uid, socket);
|
||||
threadTools.restore(data.tid, uid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:topic.lock', function(data) {
|
||||
topics.lock(data.tid, uid, socket);
|
||||
threadTools.lock(data.tid, uid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:topic.unlock', function(data) {
|
||||
topics.unlock(data.tid, uid, socket);
|
||||
threadTools.unlock(data.tid, uid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:topic.pin', function(data) {
|
||||
topics.pin(data.tid, uid, socket);
|
||||
threadTools.pin(data.tid, uid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:topic.unpin', function(data) {
|
||||
topics.unpin(data.tid, uid, socket);
|
||||
threadTools.unpin(data.tid, uid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:topic.move', function(data) {
|
||||
threadTools.move(data.tid, data.cid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:categories.get', function() {
|
||||
@@ -218,24 +224,20 @@ var SocketIO = require('socket.io').listen(global.server,{log:false}),
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('api:topic.move', function(data) {
|
||||
topics.move(data.tid, data.cid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:posts.getRawPost', function(data) {
|
||||
posts.getRawContent(data.pid, socket);
|
||||
});
|
||||
|
||||
socket.on('api:posts.edit', function(data) {
|
||||
posts.edit(uid, data.pid, data.content);
|
||||
postTools.edit(uid, data.pid, data.content);
|
||||
});
|
||||
|
||||
socket.on('api:posts.delete', function(data) {
|
||||
posts.delete(uid, data.pid);
|
||||
postTools.delete(uid, data.pid);
|
||||
});
|
||||
|
||||
socket.on('api:posts.restore', function(data) {
|
||||
posts.restore(uid, data.pid);
|
||||
postTools.restore(uid, data.pid);
|
||||
});
|
||||
|
||||
socket.on('api:notifications.get', function(data) {
|
||||
|
||||
Reference in New Issue
Block a user