From a049664219cfffc0d0d7f41b77b7c2c036352e88 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 4 Nov 2019 08:35:36 +0000 Subject: fix query with protocol prefix not always picking the right xchan (cherry picked from commit 03317b9864c0d7c99e144404c647b9923d8d29ea) --- include/follow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/follow.php b/include/follow.php index 50b952881..a4d382545 100644 --- a/include/follow.php +++ b/include/follow.php @@ -142,7 +142,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $sql_options = (($protocol) ? " and xchan_network = '" . dbesc($protocol) . "' " : ''); - $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' $sql_options ", + $r = q("select * from xchan where (xchan_addr = '%s' or xchan_url = '%s') $sql_options ", dbesc($url), dbesc($url) ); -- cgit v1.2.3