 
 unique = (obj) -> obj.id.chat_id or obj.id.gaia_id
 
-photoUrlProtocolFix = (url) -> return "http:" + url if url?.indexOf('//') == 0
-
-inputSetValue = (sel, val) ->
-    setTimeout ->
-        el = document.querySelector sel
-        el.value = val if el != null
-    , 1
-    null
+photoUrlProtocolFix = (url) -> if url?.indexOf('//') == 0 then "https:#{url}" else url
 
 module.exports = view (models) ->
     {convsettings, entity} = models

                  placeholder: 'Conversation name'
                  onkeyup: (e) ->
                      action 'conversationname', e.currentTarget.value
              inputSetValue '.name-input', convsettings.name

      div class: 'input', ->
          div ->

              cid = r?.id?.chat_id
              if unique(r) in selected_ids then return
              li ->
                  if purl = r.properties?.photo_url ? entity[cid]?.photo_url
                      img src:photoUrlProtocolFix purl
                  else
                      img src:"images/photo.jpg"
