mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
deliverable_singleton - also check hubloc_hash in case we don't have an xchan_hash
This commit is contained in:
parent
1408e3da3b
commit
86c4743ed9
1 changed files with 9 additions and 1 deletions
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue