 	contactUserId = 3-myUserId
 
 exports.render = !->
-	log 'render'
-	
+
 	Dom.style
 		fontSize: '90%'
 
 	Chat.renderMessages
 		newCount: Obs.peek -> Event.getUnread() || 0
-		content: (msg, num) !->
+		content: messageContent = (msg, num) !->
 			return if !msg.isHash()
 			byUserId = msg.get('by')
 			name = Plugin.userName byUserId

							Dom.text tr("sending")
							Ui.dots()

					Dom.onTap !->
						msgModal msg, num

	typingSub = Obs.create {}
	Server.send 'typingSub', (delta) !-> typingSub.patch delta
	Dom.div !->
		wasNearBottom = Page.nearBottom()
		users = (Plugin.userName(userId) for userId of typingSub.get() when +userId isnt myUserId)
		
		Dom.style
			fontSize: '80%'
			padding: '4px 0'

	
				Dom.div !->
					Dom.cls 'chat-content'
					if  (photoUpload = msg.get("photoUpload"))
						Dom.div !->
							Dom.style
								background: "url(#{msg.get('thumb')}) 50% 50% no-repeat"
								backgroundSize: 'cover'
								width: "90px"
								height: "70px"
								padding: "40px 0 0 60px"
							Ui.spinner 30
					else if (photoKey = msg.get('photo'))
						Dom.div !->
							Dom.cls 'img'
							Dom.style
