mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	bookmark for the post made
This commit is contained in:
		
							
								
								
									
										14
									
								
								src/user.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								src/user.js
									
									
									
									
									
								
							| @@ -6,6 +6,7 @@ var utils = require('./../public/src/utils.js'), | ||||
| 	bcrypt = require('bcrypt'), | ||||
| 	marked = require('marked'), | ||||
| 	notifications = require('./notifications.js'), | ||||
| 	topics = require('./topics.js'), | ||||
| 	async = require('async'); | ||||
|  | ||||
| (function(User) { | ||||
| @@ -465,10 +466,15 @@ var utils = require('./../public/src/utils.js'), | ||||
| 	User.sendPostNotificationToFollowers = function(uid, tid, pid) { | ||||
|  | ||||
| 		User.getUserField(uid, 'username', function(username) { | ||||
| 			User.getFollowers(uid, function(followers) { | ||||
| 				var message = username + ' made a new post'; | ||||
| 				notifications.create(message, 5, 'topic/' + tid + '/' + pid, 'notification_'+new Date().getTime(), function(nid) { | ||||
| 	 				notifications.push(nid, followers); | ||||
| 			RDB.smembers('user:'+uid+':followers', function(err, followers) { | ||||
| 				 | ||||
| 				topics.getSlug(tid, function(slug) { | ||||
|  | ||||
| 					var message = username + ' made a new post'; | ||||
|  | ||||
| 					notifications.create(message, 5, global.config.url + 'topic/' + slug + '#' + pid, 'notification_'+new Date().getTime(), function(nid) { | ||||
| 		 				notifications.push(nid, followers); | ||||
| 					}); | ||||
| 				}); | ||||
| 			}); | ||||
| 		}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user