 					_.each roster, (item) ->
 						item.lastmsgAt = values.createdAt
 						if item.createdBy.jid != values.from
-							newmsg(item)
+							item.newmsg = item.newmsg + 1
 							sails.services.rest()
 								.push req.user.token, item, values
 								.catch sails.log.error

			# create recipient roster item if necessary
			sails.services.roster
				.findOrCreate values.to, values.from
				.then (roster) ->
					roster.newmsg = roster.newmsg + 1
					roster.save().catch sails.log.error
					sails.services.rest()
						.push req.user.token, item, values
						.catch sails.log.error
		
	afterPublishCreate: (values, req) ->
		# update all target recipients corresponding roster items, and send push notification
		
		if sails.services.jid.isMuc(values.to)
			# update all subscribed parties (jid exists in roster)
