From 7aaa1973f492c3505b132a1f6af6c897fa6e0581 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 19 Nov 2018 15:04:08 -0800 Subject: push recent changes --- Zotlabs/Lib/ThreadItem.php | 4 ++++ Zotlabs/Module/Pconfig.php | 2 +- Zotlabs/Module/Zot.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 93d8aa3a5..98fb5c268 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -39,6 +39,9 @@ class ThreadItem { $this->data = $data; $this->toplevel = ($this->get_id() == $this->get_data_value('parent')); + $conv = $this->get_conversation(); + $observer = $conv->get_observer(); + // Prepare the children if($data['children']) { foreach($data['children'] as $item) { @@ -51,6 +54,7 @@ class ThreadItem { continue; } + $child = new ThreadItem($item); $this->add_child($child); } diff --git a/Zotlabs/Module/Pconfig.php b/Zotlabs/Module/Pconfig.php index 7c82bac7d..44fe5d9a9 100644 --- a/Zotlabs/Module/Pconfig.php +++ b/Zotlabs/Module/Pconfig.php @@ -43,7 +43,7 @@ class Pconfig extends \Zotlabs\Web\Controller { } - function get() { + function get() { if(! local_channel()) { return login(); diff --git a/Zotlabs/Module/Zot.php b/Zotlabs/Module/Zot.php index 8c34dced1..1cc0e54c9 100644 --- a/Zotlabs/Module/Zot.php +++ b/Zotlabs/Module/Zot.php @@ -19,7 +19,7 @@ class Zot extends \Zotlabs\Web\Controller { function init() { $zot = new ZotProtocol\Receiver(new ZotProtocol\Zot6Handler()); - json_return_and_die($zot->run(),'application/x-zot+jzon'); + json_return_and_die($zot->run(),'application/x-zot+json'); } } -- cgit v1.2.3 From 6481c9dca18d5b0e09e495b30edff987ac2da0b5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 19 Nov 2018 15:20:28 -0800 Subject: use this form instead --- Zotlabs/Lib/ThreadItem.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 98fb5c268..83d243177 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -39,8 +39,7 @@ class ThreadItem { $this->data = $data; $this->toplevel = ($this->get_id() == $this->get_data_value('parent')); - $conv = $this->get_conversation(); - $observer = $conv->get_observer(); + $observer = \App::get_observer(); // Prepare the children if($data['children']) { -- cgit v1.2.3 From ea235c0c6751b682332b968b4c18f905e8ece451 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 21 Nov 2018 20:03:58 -0800 Subject: no mention notifications from mastodon (and pleroma) --- Zotlabs/Lib/PConfig.php | 2 +- include/items.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Zotlabs/Lib/PConfig.php b/Zotlabs/Lib/PConfig.php index b9384cf6b..5e5954c95 100644 --- a/Zotlabs/Lib/PConfig.php +++ b/Zotlabs/Lib/PConfig.php @@ -138,7 +138,7 @@ class PConfig { $hash = hash('sha256',$family.':'.$key); if (self::Get($uid, 'hz_delpconfig', $hash) !== false) { - if (Get($uid, 'hz_delpconfig', $hash) > $updated) { + if (self::Get($uid, 'hz_delpconfig', $hash) > $updated) { logger('Refusing to update pconfig with outdated info (Item deleted more recently).', LOGGER_NORMAL, LOG_ERR); return self::Get($uid,$family,$key); } else { diff --git a/include/items.php b/include/items.php index 2baad3d04..19df3bb80 100755 --- a/include/items.php +++ b/include/items.php @@ -2664,7 +2664,7 @@ function tag_deliver($uid, $item_id) { if(preg_match_all($pluspattern,$body,$matches,PREG_SET_ORDER)) { foreach($matches as $match) { $matched_forums ++; - if($term['url'] === $match[1] && $term['term'] === $match[2] && intval($term['ttype']) === TERM_MENTION) { + if($term['url'] === $match[1] && intval($term['ttype']) === TERM_MENTION) { if($matched_forums <= $max_forums) { $plustagged = true; $found = true; @@ -2678,7 +2678,7 @@ function tag_deliver($uid, $item_id) { if(preg_match_all($forumpattern,$body,$matches,PREG_SET_ORDER)) { foreach($matches as $match) { $matched_forums ++; - if($term['url'] === $match[1] && $term['term'] === $match[2] && intval($term['ttype']) === TERM_FORUM) { + if($term['url'] === $match[1] && intval($term['ttype']) === TERM_FORUM) { if($matched_forums <= $max_forums) { $plustagged = true; $found = true; @@ -2914,7 +2914,7 @@ function tgroup_check($uid, $item) { if(preg_match_all($pluspattern,$body,$matches,PREG_SET_ORDER)) { foreach($matches as $match) { $matched_forums ++; - if($term['url'] === $match[1] && $term['term'] === $match[2] && intval($term['ttype']) === TERM_MENTION) { + if($term['url'] === $match[1] && intval($term['ttype']) === TERM_MENTION) { if($matched_forums <= $max_forums) { $found = true; break; @@ -2927,7 +2927,7 @@ function tgroup_check($uid, $item) { if(preg_match_all($forumpattern,$body,$matches,PREG_SET_ORDER)) { foreach($matches as $match) { $matched_forums ++; - if($term['url'] === $match[1] && $term['term'] === $match[2] && intval($term['ttype']) === TERM_FORUM) { + if($term['url'] === $match[1] && intval($term['ttype']) === TERM_FORUM) { if($matched_forums <= $max_forums) { $found = true; break; -- cgit v1.2.3