diff options
author | Allan Wang <me@allanwang.ca> | 2018-09-27 18:03:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 18:03:53 -0400 |
commit | 7460935f32748b10f6b3fedf9e77a373a9010d05 (patch) | |
tree | eeaa5c880679198ee1a9dff885a1c7fc6c84207e /app/src/main/kotlin/com/pitchedapps/frost/facebook/requests | |
parent | 5db95f245101b221ca5669c4e4b5e526d941d68f (diff) | |
download | frost-7460935f32748b10f6b3fedf9e77a373a9010d05.tar.gz frost-7460935f32748b10f6b3fedf9e77a373a9010d05.tar.bz2 frost-7460935f32748b10f6b3fedf9e77a373a9010d05.zip |
Move parsers to facebook folder (#1109)
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/requests')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt index 692312a1..a4b0a347 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt @@ -52,7 +52,7 @@ data class RequestAuth(val userId: Long = -1, val cookie: String = "", val fb_dtsg: String = "", val rev: String = "") { - val isValid + val isComplete get() = userId > 0 && cookie.isNotEmpty() && fb_dtsg.isNotEmpty() && rev.isNotEmpty() } @@ -121,13 +121,13 @@ fun String.getAuth(): RequestAuth { val fb_dtsg = FB_DTSG_MATCHER.find(text)[1] if (fb_dtsg != null) { auth = auth.copy(fb_dtsg = fb_dtsg) - if (auth.isValid) return auth + if (auth.isComplete) return auth } val rev = FB_REV_MATCHER.find(text)[1] if (rev != null) { auth = auth.copy(rev = rev) - if (auth.isValid) return auth + if (auth.isComplete) return auth } } } |