Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Fixing issue where missing deviceId on session expired and re-login
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyhulen committed Jul 6, 2016
1 parent 2c65cda commit 1f021c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Mattermost/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ class MyURLProtocol: NSURLProtocol {
return false
}

let isLogin = request.URL?.path?.containsString("/login") ?? false
if (isServer && isLogin) {
print("login detected")
Utils.setProp(ATTACHED_DEVICE, value: "")
return false
}

let isLogout = request.URL?.path?.containsString("/users/logout") ?? false
if (isServer && isLogout) {
print("logout detected")
Expand Down
2 changes: 1 addition & 1 deletion Mattermost/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>29</string>
<string>31</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
Expand Down

0 comments on commit 1f021c2

Please sign in to comment.