mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user