diff --git a/boot.php b/boot.php index 1d21c71ee..c8d9cebfe 100755 --- a/boot.php +++ b/boot.php @@ -27,7 +27,7 @@ use Code\Lib\Url; */ const REPOSITORY_ID = 'streams'; -const DB_UPDATE_VERSION = 1277; +const DB_UPDATE_VERSION = 1278; const PROJECT_BASE = __DIR__; const ACTIVITYPUB_ENABLED = true; const NOMAD_PROTOCOL_VERSION = '13.3'; diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 83202a0d6..6d5d9b325 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -617,8 +617,8 @@ CREATE TABLE IF NOT EXISTS `item` ( `item_delayed` tinyint NOT NULL DEFAULT 0 , `item_pending_remove` tinyint NOT NULL DEFAULT 0 , `item_blocked` tinyint NOT NULL DEFAULT 0 , - `lat` float NOT NULL DEFAULT '0', - `lon` float NOT NULL DEFAULT '0', + `lat` double NOT NULL DEFAULT '0', + `lon` double NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `parent` (`parent`), KEY `created` (`created`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index e7fa509c2..d91792203 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -631,8 +631,8 @@ CREATE TABLE "item" ( "item_delayed" smallint NOT NULL DEFAULT '0', "item_pending_remove" smallint NOT NULL DEFAULT '0', "item_blocked" smallint NOT NULL DEFAULT '0', - "lat" float NOT NULL DEFAULT '0', - "lon" float NOT NULL DEFAULT '0', + "lat" double NOT NULL DEFAULT '0', + "lon" double NOT NULL DEFAULT '0', "item_search_vector" tsvector, PRIMARY KEY ("id") ); diff --git a/src/Lib/Libzot.php b/src/Lib/Libzot.php index 45c52f593..d367d7d21 100644 --- a/src/Lib/Libzot.php +++ b/src/Lib/Libzot.php @@ -908,6 +908,11 @@ class Libzot $px = 1; } + if (! empty($arr['did'])) { + // see if this system supports did and if this channel has been migrated already. + // If not, migrate it. + } + $x = xchan_store_lowlevel( [ 'xchan_hash' => $xchan_hash, @@ -3029,8 +3034,10 @@ class Libzot // Communication details + $ret['id'] = $e['xchan_guid']; $ret['id_sig'] = self::sign($e['xchan_guid'], $e['channel_prvkey']); + $ret['did'] = Channel::getDidResolver($e); $primary = new Primary([ 'address' => $e['xchan_addr'], diff --git a/src/Update/_1278.php b/src/Update/_1278.php new file mode 100644 index 000000000..4fa569398 --- /dev/null +++ b/src/Update/_1278.php @@ -0,0 +1,48 @@ +