diff options
author | Allan Wang <me@allanwang.ca> | 2018-11-18 21:28:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-18 21:28:25 -0500 |
commit | dc6c12ba40b179ceb11a77da8828b79d360f79eb (patch) | |
tree | 96306bccf6dc983f31e8bc30a6323e825dbac627 /app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers | |
parent | 587f359b20a56b4cee4e1fc6c788c40102f0892f (diff) | |
download | frost-dc6c12ba40b179ceb11a77da8828b79d360f79eb.tar.gz frost-dc6c12ba40b179ceb11a77da8828b79d360f79eb.tar.bz2 frost-dc6c12ba40b179ceb11a77da8828b79d360f79eb.zip |
Fix/personal messages (#1194)
* Update dependency versions
* Fix regex to support personal messages, resolves #1180
* Update download url, resolves #1131
* Update changelog
* Downgrade apache dependency version
* Disable travis for master pushes [skip ci]
* Support java 1.8
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/NotifParser.kt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt index a3ebf998..27b731bc 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt @@ -92,7 +92,7 @@ private class MessageParserImpl : FrostParserBase<FrostMessages>(true) { override fun parseImpl(doc: Document): FrostMessages? { val threadList = doc.getElementById("threadlist_rows") ?: return null - val threads: List<FrostThread> = threadList.getElementsByAttributeValueContaining("id", "thread_fbid_") + val threads: List<FrostThread> = threadList.getElementsByAttributeValueMatching("id", ".*${FB_MESSAGE_NOTIF_ID_MATCHER.pattern}.*") .mapNotNull(this::parseMessage) val seeMore = parseLink(doc.getElementById("see_older_threads")) val extraLinks = threadList.nextElementSibling().select("a") diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/NotifParser.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/NotifParser.kt index 410a0e84..8aa8e706 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/NotifParser.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/NotifParser.kt @@ -67,7 +67,7 @@ private class NotifParserImpl : FrostParserBase<FrostNotifs>(false) { override fun parseImpl(doc: Document): FrostNotifs? { val notificationList = doc.getElementById("notifications_list") ?: return null val notifications = notificationList - .getElementsByAttributeValueContaining("id", "list_notif_") + .getElementsByAttributeValueMatching("id", ".*${FB_NOTIF_ID_MATCHER.pattern}.*") .mapNotNull(this::parseNotif) val seeMore = parseLink(doc.getElementsByAttributeValue("href", "/notifications.php?more").first()) return FrostNotifs(notifications, seeMore) |