diff --git a/src/Lib/Activity.php b/src/Lib/Activity.php index 10077f04d..864fd210e 100644 --- a/src/Lib/Activity.php +++ b/src/Lib/Activity.php @@ -2247,7 +2247,7 @@ class Activity // The xchan should have been created by actor_store() above $r = q( - "select * from xchan where xchan_hash = '%s' and xchan_network = 'activitypub' limit 1", + "select * from xchan where xchan_hash = '%s' and xchan_network in ('activitypub', 'apnomadic') limit 1", dbesc($actorId->getId()) ); diff --git a/src/Module/Import.php b/src/Module/Import.php index 7b1e5f2d2..1ce951785 100644 --- a/src/Module/Import.php +++ b/src/Module/Import.php @@ -194,14 +194,14 @@ class Import extends Controller $eprvkey = $multibase->decode($data['privateKeyMultibase']); if ($epubkey && $eprvkey) { - $existing = q("select * from channel where epubkey = '%s'", + $existing = q("select * from channel where channel_epubkey = '%s'", dbesc($epubkey) ); if ($existing) { notice(t('Identity key is already being used on this instance.')); return; } - q("update channel set epubkey = '%s', eprivkey = '%s' where channel_id = %d", + q("update channel set channel_epubkey = '%s', eprivkey = '%s' where channel_id = %d", dbesc($epubkey), dbesc($eprvkey), intval($channel['channel_id']) diff --git a/src/Update/_1271.php b/src/Update/_1271.php index 43548ab3a..5cbeffeb7 100644 --- a/src/Update/_1271.php +++ b/src/Update/_1271.php @@ -47,7 +47,7 @@ class _1271 public function verify() { $columns = db_columns('channel'); - return in_array('epubkey', $columns) && in_array('eprvkey', $columns); + return in_array('channel_epubkey', $columns) && in_array('channel_eprvkey', $columns); } }