From 86c4743ed9e76f8a813f6aa8075eb68e155d85dd Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 10 Aug 2017 21:43:36 -0700 Subject: deliverable_singleton - also check hubloc_hash in case we don't have an xchan_hash --- include/network.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index 96f4416c8..4ea619bf5 100644 --- a/include/network.php +++ b/include/network.php @@ -1652,9 +1652,17 @@ function check_channelallowed($hash) { } function deliverable_singleton($channel_id,$xchan) { + + if(array_key_exists('xchan_hash',$xchan)) + $xchan_hash = $xchan['xchan_hash']; + elseif(array_key_exists('hubloc_hash',$xchan)) + $xchan_hash = $xchan['hubloc_hash']; + else + return true; + $r = q("select abook_instance from abook where abook_channel = %d and abook_xchan = '%s' limit 1", intval($channel_id), - dbesc($xchan['xchan_hash']) + dbesc($xchan_hash) ); if($r) { if(! $r[0]['abook_instance']) -- cgit v1.2.3