updating post and topic methods so that when you reply to a post or create a new topic, that topic isn't flagged as unread for you

v1.18.x
Julian Lam 12 years ago
parent 826edbd669
commit 71482163ed

@ -168,6 +168,9 @@ marked.setOptions({
RDB.del('tid:' + tid + ':read_by_uid'); // let everybody know there is an unread post
// Re-add the poster, so he/she does not get an "unread" flag on this topic
topics.markAsRead(tid, uid);
socket.emit('event:alert', {
title: 'Reply Successful',
message: 'You have successfully replied. Click here to view your reply.',

@ -215,6 +215,7 @@ var RDB = require('./redis.js'),
if (pid > 0) RDB.lpush('tid:' + tid + ':posts', pid);
});
Topics.markAsRead(tid, uid);
// User Details - move this out later
RDB.lpush('uid:' + uid + ':topics', tid);

Loading…
Cancel
Save