     , false, (ev, conv_id) -> conv_id
 
     ipc.on 'appfocus', ->
-      app.focus()
-      if mainWindow.isVisible()
-        mainWindow.focus()
-      else
-        mainWindow.show()
+        app.focus()
+        if mainWindow.isVisible()
+            mainWindow.focus()
+        else
+            mainWindow.show()
 
     # no retries, dedupe on conv_id
     ipc.on 'settyping', seqreq (ev, conv_id, v) ->

                delivery_medium = null
                client.sendchatmessage(conv_id, segs, image_id, otr, client_generated_id, delivery_medium, message_action_type).then (r) ->
                      # console.log 'sendchatmessage:result', r?.created_event?.self_event_state?.client_generated_id
                      ipcsend 'sendchatmessage:result', r
                      resolve()
            attempt()
        messageQueue = messageQueue.then ->
            sendForSure()

    , false, (ev, conv_id, timestamp, max) -> conv_id

    ipc.on 'togglefullscreen', ->
        mainWindow.setFullScreen not mainWindow.isFullScreen()

    # bye bye
    ipc.on 'logout', logout
