 			@msgType: (msg) ->
 				if msg.file
 					switch true
-						when sails.services.file.isImg(msg.file.base)
+						when sails.services.file.isImg msg.file_inode
 							return 'img'
-						when sails.services.file.isAudio(msg.file.base)
+						when sails.services.file.isAudio msg.file_inode
 							return 'audio'
 						else
 							return 'file'


			model: Msg

		class Device extends pageableAR.Model
			$urlRoot: ->
				urlRoot(@, "api/device", env.server.mobile.urlRoot)

					ret[field] = new Date Date.parse ret[field]

				return ret

			$fetch: (opts) ->
				super _.extend opts, populate: ['file_inode', 'createdBy']

		class Attachment extends pageableAR.Model
			$urlRoot: ->
