function desktopMentionNotify() {
			if (!bunkerData.mentionsUser(message.text) || !message.author) return;

			// if bunker is open and user is in room, don't show notification
			if (bunkerIsVisible && $rootScope.roomId == room.id) return;

			var decodedText = $('<div/>').html(message.text).text();

			//TODO: Check if creating event listeners like this causes memory leaks
			var mention = $notification(room.name + " - bunker", {
				body: message.author.nick + ': ' + decodedText,
				tag: message.id,
				icon: '/assets/images/bunkerIcon.png'
			});

			mention.$on('click', function () {
				$state.go('chat.room', {roomId: room.id});
			});

			mention.$on('close', function () {
				mention = null;
			});

			mention.$on('error', function (e) {
				$log.error('desktop notification error', e);
			});
		}
// needs to be tracked separately depending on the set user settings
needs to be tracked separately depending on the set user settings
needs to be tracked separately depending on the set user settings
function desktopMentionNotify() {
			if (!bunkerData.mentionsUser(message.text) || !message.author) return;
			if (bunkerIsVisible && $rootScope.roomId == room.id) return;
			var decodedText = $('<div/>').html(message.text).text();
			var mention = $notification(room.name + " - bunker", {
				body: message.author.nick + ': ' + decodedText,
				tag: message.id,
				icon: '/assets/images/bunkerIcon.png'
			});
			mention.$on('click', function () {
				$state.go('chat.room', {roomId: room.id});
			});
			mention.$on('close', function () {
				mention = null;
			});
			mention.$on('error', function (e) {
				$log.error('desktop notification error', e);
			});
		}
function desktopMentionNotify ( ) { if ( ! bunkerData . mentionsUser ( message . text ) || ! message . author ) return ; if ( bunkerIsVisible && $rootScope . roomId == room . id ) return ; var decodedText = $ ( '<div/>' ) . html ( message . text ) . text ( ) ; var mention = $notification ( room . name + " - bunker" , { body : message . author . nick + ': ' + decodedText , tag : message . id , icon : '/assets/images/bunkerIcon.png' } ) ; mention . $on ( 'click' , function ( ) { $state . go ( 'chat.room' , { roomId : room . id } ) ; } ) ; mention . $on ( 'close' , function ( ) { mention = null ; } ) ; mention . $on ( 'error' , function ( e ) { $log . error ( 'desktop notification error' , e ) ; } ) ; }
needs to be tracked separately depending on the set user settings
needs to be tracked separately depending on the set user settings
// if bunker is open and user is in room, don't show notification //TODO: Check if creating event listeners like this causes memory leaks