mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
changes bookmark storage to sortedset, gets uid from socket rather than being passed from client
This commit is contained in:
@@ -96,10 +96,9 @@ SocketTopics.postcount = function(socket, tid, callback) {
|
||||
topics.getTopicField(tid, 'postcount', callback);
|
||||
};
|
||||
|
||||
SocketTopics.bookmark = function(socket, data, callback) {
|
||||
// data contains tid, uid, and postIndex
|
||||
topics.setUserBookmark(data, callback);
|
||||
}
|
||||
SocketTopics.bookmark = function(socket, payload, callback) {
|
||||
topics.setUserBookmark(payload.tid, socket.uid, payload.index, callback);
|
||||
};
|
||||
|
||||
SocketTopics.markAsRead = function(socket, tids, callback) {
|
||||
if(!Array.isArray(tids) || !socket.uid) {
|
||||
|
||||
Reference in New Issue
Block a user