mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	Merge branch 'master' of https://github.com/psychobunny/node-forum
This commit is contained in:
		| @@ -72,7 +72,7 @@ var	RDB = require('./redis.js'), | ||||
|  | ||||
|  | ||||
| 	Posts.reply = function(socket, tid, uid, content) { | ||||
| 		Posts.create(uid, content, function(pid) { | ||||
| 		Posts.create(uid, tid, content, function(pid) { | ||||
| 			RDB.rpush('tid:' + tid + ':posts', pid); | ||||
|  | ||||
| 			socket.emit('event:alert', { | ||||
| @@ -84,7 +84,7 @@ var	RDB = require('./redis.js'), | ||||
| 		}); | ||||
| 	}; | ||||
|  | ||||
| 	Posts.create = function(uid, content, callback) { | ||||
| 	Posts.create = function(uid, tid, content, callback) { | ||||
| 		if (uid === null) return; | ||||
| 		 | ||||
| 		RDB.incr('global:next_post_id', function(pid) { | ||||
| @@ -93,6 +93,8 @@ var	RDB = require('./redis.js'), | ||||
| 			RDB.set('pid:' + pid + ':uid', uid); | ||||
| 			RDB.set('pid:' + pid + ':timestamp', new Date().getTime()); | ||||
| 			 | ||||
| 			RDB.incr('tid:' + tid + ':postcount'); | ||||
| 			 | ||||
| 			// User Details - move this out later | ||||
| 			RDB.lpush('uid:' + uid + ':posts', pid); | ||||
| 			 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user