mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-01 04:09:51 +01:00
WIP post diffs
This commit is contained in:
@@ -20,6 +20,7 @@ require('./posts/move')(SocketPosts);
|
||||
require('./posts/votes')(SocketPosts);
|
||||
require('./posts/bookmarks')(SocketPosts);
|
||||
require('./posts/tools')(SocketPosts);
|
||||
require('./posts/diffs')(SocketPosts);
|
||||
|
||||
SocketPosts.reply = function (socket, data, callback) {
|
||||
if (!data || !data.tid || (parseInt(meta.config.minimumPostLength, 10) !== 0 && !data.content)) {
|
||||
|
||||
13
src/socket.io/posts/diffs.js
Normal file
13
src/socket.io/posts/diffs.js
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var posts = require('../../posts');
|
||||
|
||||
module.exports = function (SocketPosts) {
|
||||
SocketPosts.getDiffs = function (socket, data, callback) {
|
||||
posts.diffs.list(data.pid, callback);
|
||||
};
|
||||
|
||||
SocketPosts.showPostAt = function (socket, data, callback) {
|
||||
posts.diffs.load(data.pid, data.since, callback);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user