aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Zot6/Zot6Handler.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-06 20:44:40 -0800
committerzotlabs <mike@macgirvin.com>2018-11-06 20:44:40 -0800
commitbb8b3b92913832750a393533f491725b4330a8e1 (patch)
tree3fbcd1466f061fc85129e3caa165b9df999a59a1 /Zotlabs/Zot6/Zot6Handler.php
parente7f1d350c92bb2be87adefd33ab877ef6e121af2 (diff)
downloadvolse-hubzilla-bb8b3b92913832750a393533f491725b4330a8e1.tar.gz
volse-hubzilla-bb8b3b92913832750a393533f491725b4330a8e1.tar.bz2
volse-hubzilla-bb8b3b92913832750a393533f491725b4330a8e1.zip
this is brutal
Diffstat (limited to 'Zotlabs/Zot6/Zot6Handler.php')
-rw-r--r--Zotlabs/Zot6/Zot6Handler.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/Zotlabs/Zot6/Zot6Handler.php b/Zotlabs/Zot6/Zot6Handler.php
index 1fae81ae6..e320e7825 100644
--- a/Zotlabs/Zot6/Zot6Handler.php
+++ b/Zotlabs/Zot6/Zot6Handler.php
@@ -72,8 +72,8 @@ class Zot6Handler implements IHandler {
foreach ($recipients as $recip) {
$r = q("select channel.*,xchan.* from channel
- left join xchan on channel_portable_id = xchan_portable_id
- where xchan_portable_id ='%s' limit 1",
+ left join xchan on channel_portable_id = xchan_hash
+ where xchan_hash ='%s' limit 1",
dbesc($recip)
);
@@ -141,7 +141,7 @@ class Zot6Handler implements IHandler {
$arr = $data['recipients'][0];
- $c = q("select * from channel left join xchan on channel_portable_id = xchan_portable_id where channel_portable_id = '%s' limit 1",
+ $c = q("select * from channel left join xchan on channel_portable_id = xchan_hash where channel_portable_id = '%s' limit 1",
dbesc($arr['portable_id'])
);
if (! $c) {
@@ -197,7 +197,7 @@ class Zot6Handler implements IHandler {
return $ret;
}
- $r = q("select * from xchan where xchan_hash = '%s' or xchan_portable_id = '%s' limit 1",
+ $r = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($sender)
);
@@ -231,15 +231,14 @@ class Zot6Handler implements IHandler {
// basically this means "unfriend"
foreach ($recipients as $recip) {
$r = q("select channel.*,xchan.* from channel
- left join xchan on channel_portable_id = xchan_portable_id
+ left join xchan on channel_portable_id = xchan_hash
where channel_portable_id = '%s' limit 1",
dbesc($recip)
);
if ($r) {
- $r = q("select abook_id from abook where uid = %d and (abook_xchan = '%s' or abook_xchan = '%s') limit 1",
+ $r = q("select abook_id from abook where uid = %d and abook_xchan = '%s' limit 1",
intval($r[0]['channel_id']),
- dbesc($sender),
- dbesc($r[0]['xchan_portable_id'])
+ dbesc($sender)
);
if ($r) {
contact_remove($r[0]['channel_id'],$r[0]['abook_id']);