From 47844cf1b10d2197b3d326ffb7edc9cbe6ff32e8 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 8 Dec 2020 21:55:02 +0000 Subject: [PATCH 1/2] Twitter: "remote self" posts had been posted with an invalid priority --- twitter/twitter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 5ebb8318..278989ad 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1940,7 +1940,9 @@ function twitter_fetchhometimeline(App $a, $uid) if (empty($postarray['thr-parent'])) { $contact = DBA::selectFirst('contact', [], ['id' => $postarray['contact-id'], 'self' => false]); if (DBA::isResult($contact)) { - $notify = Item::isRemoteSelf($contact, $postarray); + if (Item::isRemoteSelf($contact, $postarray)) { + $notify = PRIORITY_MEDIUM; + } } } From 3c18a3eedd118c37d7b0afde5b94f0e7d83b9158 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 9 Dec 2020 05:55:10 +0000 Subject: [PATCH 2/2] Simplified code --- twitter/twitter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 278989ad..1f7328ec 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1939,10 +1939,8 @@ function twitter_fetchhometimeline(App $a, $uid) if (empty($postarray['thr-parent'])) { $contact = DBA::selectFirst('contact', [], ['id' => $postarray['contact-id'], 'self' => false]); - if (DBA::isResult($contact)) { - if (Item::isRemoteSelf($contact, $postarray)) { - $notify = PRIORITY_MEDIUM; - } + if (DBA::isResult($contact) && Item::isRemoteSelf($contact, $postarray)) { + $notify = PRIORITY_MEDIUM; } }