let pmSocket

$(function () {
	pmSocket = io('/pm');

	pmSocket.on('test', data => console.log(data))

	pmSocket.on('pm received', data => {
		console.log(data)
	})

	pmSocket.on('pm ack', () => {
		console.log(`Last PM was acked`)
	})

	pmSocket.on('pm system', data => {
		console.log(data)
	})

	pmSocket.on('user blocked', data => {
		console.log(data)
	})

	pmSocket.on('user unblocked', data => {
		console.log(data)
	})

	pmSocket.on('user friended', data => {
		console.log(data)
	})

	pmSocket.on('user unfriended', data => {
		console.log(data)
	})
});