diff --git a/CHANGELOG b/CHANGELOG index 07235549ff..925490d0c7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,87 @@ +Version 2024.08 (unreleased) + Friendica Core + Updates to the translations AR, CS, DE, ES, FR, GD, HU, IS, IT, JA, NL, PL, RU, SV + Updates to the documentation [foss-, loma-one, mexon] + Updates to the themes (frio) [haheute] + General code cleanup [annando, haheute, mexon, MrPetovan] + Improved the redirection for contact actions [annando] + Improved the performance while fetching of replies [annando] + Improved the performance when visiting remote profiles [annando] + Improved OWA [annando] + Improved the procession of worker tasks [annando] + Improved performance in the probing process [annando] + Improved INBOX performance [annando] + Improved perfomance when expireing postings [annando] + Improved mirroring settings for RSS contacts [annando] + Improved supported image formats [annando] + Improved handling of CC for comments [annando] + Improved handling of "sensitive" flags for postings [annando] + Improved display of log levels [annando, tobiasd] + Improved handling of permissions for attachments [annando] + Improved addon handling [MrPetovan] + Improved API for channels and circles [annando] + Improved performance while displaying local postings [annando] + Improved federation with pixelfed, threads [annando] + Improved integration with Bluesky [annando] + Improved automatic cleanup of the database [annando] + Fixed access to restricted timeline via API [annando] + Fixed problem fetching from INBOXes [annando] + Fixed display of contacts from unavailable networks [annando] + Fixed profile display [annando] + Fixed a problem with local un-/follows [annando] + Fixed the uimport POST endpoint [annando] + Fixed problem with 0Auth logins [annando] + Fixed problem with @mentions in comments [annando] + Fixed XSS in profile fields [annando, apexrabbit, Devilx86, MrPetovan, ponlayookm] + Fixed bug in deleting unused cached avatar pictures [annando] + Fixed paging bug on the media tab of remote profiles [annando] + Fixed display of attached links [annando] + Fixed a bug in circle only contacts [annando] + Fixed display of moderation reports [MrPetovan, TheTomcat14] + Fixed delivery problems to group postings [annando] + Added monitoring service endpoint [annando] + Added admin option display_link_length to set the length of displayed links [annando] + Added the possibility to upload media files via API [annando] + Added console command to clear avatar cache [annando] + Added platform data to the API [annando] + Added parsing support for Nodeinfo 2.1 and 2.2 [annando] + Added node description to Nodeinfo [annando] + Added owner information of relay accounts [annando] + Added option for users about how to transmit postings with titles [annando] + Added for non HTML content of feeds [annando] + Added reshares for postings from Bluesky and tumbl [annando] + Added public forums with manual request approval [annando] + Added "next try" information for deferred worker jobs listing [annando] + Added support of FEP-e232 [annando] + Added automatic closure of registration if admin becomes inactive [annando] + Added channel only option for contacts [annando] + + Friendica Addons + Updates to the translations AR, CS, DE, FR, IT, PL, SV + Blockbot + Added Relatica to good client list [hankg] + Improved agent identifier list [annando] + Bluesky + Added monitoring statistics [annando] + Added support of sensitive postings [annando] + Improved API handling [annando] + Improved fetching of user DID [annando] + Fixed conversion BS/Friendica handles [annando] + jsuploader + Improved detection of supported file types [annando] + mailstream + Improved image handling [mexon] + tumblr + Added monitoring statistics [annando] + Improved quoted postings [annando] + + Closed Issues + 11963, 13714, 13787, 13812, 13821, 13910, 14012, 14030, 14059, + 14077, 14079, 14045, 14052, 14055, 14081, 14084, 14102, 14110, + 14118, 14121, 14125, 14132, 14134, 14153, 14160, 14170, 14175, + 14186, 14197, 14220, 14228, 14231, 14240, 14249, 14250, 14285, + 14295, 14303, 14312, 14324, 14329, 14349, 14364 + Version 2024.03 (2024-03-21) Friendica Core Updates to the translations AR, BG, CS, DE, EO, ES, FR, GD, HU, IS, IT, JA, PL, RO, RU, SV @@ -285,7 +369,7 @@ Version 2023.04 (2023-04-23) twitter Improve remote-self handling [annando] impressum - Avoide obfuscation on un-set email addresses [MrPestovan] + Avoide obfuscation on un-set email addresses [MrPetovan] notifyall Fixed a bug selecting the email addresses [nupplaphil] tumblr @@ -1734,7 +1818,7 @@ Version 2018.05 (2018-06-01) Friendica Addons: Updates to the translations (DE, EN_GB, EN_US, ES, FI, FR, IS, IT, NL, PL, RU, ZH_CN) [translation teams] - advancedcontentfilter: new addon with advanced filter capabilities [MrPetova] + advancedcontentfilter: new addon with advanced filter capabilities [MrPetovan] catavatar: new addon for profile pictures based on David Revoy's cat-avatar generator [annando, fabrixxm, tobiasd] languagefilter: better help text [andyhee] mathjax: fixed the config form and adopted new CDN URL [tobiasd] diff --git a/VERSION b/VERSION index 0d4c426015..60c1d71035 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024.03 +2024.06-rc diff --git a/bin/dev/autotest.sh b/bin/dev/autotest.sh index b6f67cf118..a7a908327c 100755 --- a/bin/dev/autotest.sh +++ b/bin/dev/autotest.sh @@ -138,9 +138,9 @@ function execute_tests() { if [ -n "${USEDOCKER}" ]; then echo "Fire up the mysql docker" DOCKER_CONTAINER_ID=$(docker run \ - -e MYSQL_ROOT_PASSWORD=friendica \ + -e MYSQL_ROOT_PASSWORD="${DATABASE_PASSWORD}" \ -e MYSQL_USER="${DATABASE_USER}" \ - -e MYSQL_PASSWORD=friendica \ + -e MYSQL_PASSWORD="${DATABASE_PASSWORD}" \ -e MYSQL_DATABASE="${DATABASE_NAME}" \ -d mysql) DATABASE_HOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "${DOCKER_CONTAINER_ID}") @@ -152,8 +152,8 @@ function execute_tests() { echo "To use the docker container set the USEDOCKER environment variable" exit 3 fi - mysql -u "${DATABASE_USER}" -pfriendica -e "DROP DATABASE IF EXISTS ${DATABASE_NAME}" -h ${DATABASE_HOST} || true - mysql -u "${DATABASE_USER}" -pfriendica -e "CREATE DATABASE ${DATABASE_NAME} DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" -h ${DATABASE_HOST} + mysql -u "${DATABASE_USER}" -p"${DATABASE_PASSWORD}" -e "DROP DATABASE IF EXISTS ${DATABASE_NAME}" -h ${DATABASE_HOST} || true + mysql -u "${DATABASE_USER}" -p"${DATABASE_PASSWORD}" -e "CREATE DATABASE ${DATABASE_NAME} DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" -h ${DATABASE_HOST} else DATABASE_HOST=mysql fi @@ -171,9 +171,9 @@ function execute_tests() { if [ -n "${USEDOCKER}" ]; then echo "Fire up the mariadb docker" DOCKER_CONTAINER_ID=$(docker run \ - -e MYSQL_ROOT_PASSWORD=friendica \ + -e MYSQL_ROOT_PASSWORD="${DATABASE_PASSWORD}" \ -e MYSQL_USER="${DATABASE_USER}" \ - -e MYSQL_PASSWORD=friendica \ + -e MYSQL_PASSWORD="${DATABASE_PASSWORD}" \ -e MYSQL_DATABASE="${DATABASE_NAME}" \ -d mariadb) DATABASE_HOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "${DOCKER_CONTAINER_ID}") @@ -185,8 +185,8 @@ function execute_tests() { echo "To use the docker container set the USEDOCKER environment variable" exit 3 fi - mysql -u "${DATABASE_USER}" -pfriendica -e "DROP DATABASE IF EXISTS ${DATABASE_NAME}" -h ${DATABASE_HOST} || true - mysql -u "${DATABASE_USER}" -pfriendica -e "CREATE DATABASE ${DATABASE_NAME} DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" -h ${DATABASE_HOST} + mysql -u "${DATABASE_USER}" -p"${DATABASE_PASSWORD}" -e "DROP DATABASE IF EXISTS ${DATABASE_NAME}" -h ${DATABASE_HOST} || true + mysql -u "${DATABASE_USER}" -p"${DATABASE_PASSWORD}" -e "CREATE DATABASE ${DATABASE_NAME} DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" -h ${DATABASE_HOST} else DATABASE_HOST=mariadb fi @@ -203,14 +203,14 @@ function execute_tests() { if [ -n "${USEDOCKER}" ]; then echo "Initialize database..." - docker exec ${DOCKER_CONTAINER_ID} mysql -u root -pfriendica -e "CREATE DATABASE IF NOT EXISTS ${DATABASE_NAME};" + docker exec ${DOCKER_CONTAINER_ID} mysql -u root -p"${DATABASE_PASSWORD}" -e "CREATE DATABASE IF NOT EXISTS ${DATABASE_NAME};" fi export MYSQL_HOST="${DATABASE_HOST}" #call installer echo "Installing Friendica..." - "${PHP}" ./bin/console.php autoinstall --dbuser="${DATABASE_USER}" --dbpass=friendica --dbdata="${DATABASE_NAME}" --dbhost="${DATABASE_HOST}" --url=https://friendica.local --admin=admin@friendica.local + "${PHP}" ./bin/console.php autoinstall --dbuser="${DATABASE_USER}" --dbpass="${DATABASE_PASSWORD}" --dbdata="${DATABASE_NAME}" --dbhost="${DATABASE_HOST}" --url=https://friendica.local --admin=admin@friendica.local fi #test execution diff --git a/bin/run_xgettext.sh b/bin/run_xgettext.sh index 0768ed4f14..254fc50699 100755 --- a/bin/run_xgettext.sh +++ b/bin/run_xgettext.sh @@ -72,7 +72,7 @@ echo "Extract strings to $OUTFILE.." [ -f "$OUTFILE" ] && rm "$OUTFILE"; touch "$OUTFILE" # shellcheck disable=SC2086 # $FINDOPTS is meant to be split -find_result=$(find "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f | LC_ALL=C sort --stable) +find_result=$(find "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f | LC_ALL=C sort -s) total_files=$(wc -l <<< "${find_result}") @@ -86,7 +86,7 @@ do if [ ! -d "$file" ] then # shellcheck disable=SC2086 # $KEYWORDS is meant to be split - xgettext $KEYWORDS -j -o "$OUTFILE" --from-code=UTF-8 "$file" || exit 1 + xgettext $KEYWORDS --no-wrap -j -o "$OUTFILE" --from-code=UTF-8 "$file" || exit 1 sed -i.bkp "s/CHARSET/UTF-8/g" "$OUTFILE" fi (( count++ )) diff --git a/database.sql b/database.sql index 3267cfaa4e..eef9c762fa 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 2024.03 (Yellow Archangel) --- DB_UPDATE_VERSION 1557 +-- Friendica 2024.06-rc (Yellow Archangel) +-- DB_UPDATE_VERSION 1571 -- ------------------------------------------ @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `gserver` ( `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `url` varbinary(383) NOT NULL DEFAULT '' COMMENT '', `nurl` varbinary(383) NOT NULL DEFAULT '' COMMENT '', - `version` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `version` varchar(255) NOT NULL DEFAULT '' COMMENT 'The version of this server software.', `site_name` varchar(255) NOT NULL DEFAULT '' COMMENT '', `info` text COMMENT '', `register_policy` tinyint NOT NULL DEFAULT 0 COMMENT '', @@ -23,10 +23,14 @@ CREATE TABLE IF NOT EXISTS `gserver` ( `local-comments` int unsigned COMMENT 'Number of local comments', `directory-type` tinyint DEFAULT 0 COMMENT 'Type of directory service (Poco, Mastodon)', `poco` varbinary(383) NOT NULL DEFAULT '' COMMENT '', + `openwebauth` varbinary(383) COMMENT 'Path to the OpenWebAuth endpoint', + `authredirect` varbinary(383) COMMENT 'Path to the authRedirect endpoint', `noscrape` varbinary(383) NOT NULL DEFAULT '' COMMENT '', `network` char(4) NOT NULL DEFAULT '' COMMENT '', `protocol` tinyint unsigned COMMENT 'The protocol of the server', - `platform` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `platform` varchar(255) NOT NULL DEFAULT '' COMMENT 'The canonical name of this server software.', + `repository` varbinary(383) COMMENT 'The url of the source code repository of this server software.', + `homepage` varbinary(383) COMMENT 'The url of the homepage of this server software.', `relay-subscribe` boolean NOT NULL DEFAULT '0' COMMENT 'Has the server subscribed to the relay system', `relay-scope` varchar(10) NOT NULL DEFAULT '' COMMENT 'The scope of messages that the server wants to get', `detection-method` tinyint unsigned COMMENT 'Method that had been used to detect that server', @@ -813,6 +817,7 @@ CREATE TABLE IF NOT EXISTS `inbox-entry` ( `activity-id` varbinary(383) COMMENT 'id of the incoming activity', `object-id` varbinary(383) COMMENT '', `in-reply-to-id` varbinary(383) COMMENT '', + `context` varbinary(383) COMMENT '', `conversation` varbinary(383) COMMENT '', `type` varchar(64) COMMENT 'Type of the activity', `object-type` varchar(64) COMMENT 'Type of the object activity', @@ -823,6 +828,7 @@ CREATE TABLE IF NOT EXISTS `inbox-entry` ( `push` boolean COMMENT 'Is the entry pushed or have pulled it?', `trust` boolean COMMENT 'Do we trust this entry?', `wid` int unsigned COMMENT 'Workerqueue id', + `retrial` tinyint unsigned DEFAULT 0 COMMENT 'Retrial counter', PRIMARY KEY(`id`), UNIQUE INDEX `activity-id` (`activity-id`), INDEX `object-id` (`object-id`), @@ -1181,6 +1187,7 @@ CREATE TABLE IF NOT EXISTS `post` ( `parent-uri-id` int unsigned COMMENT 'Id of the item-uri table that contains the parent uri', `thr-parent-id` int unsigned COMMENT 'Id of the item-uri table that contains the thread parent uri', `external-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the external uri', + `replies-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the endpoint for the replies collection', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation timestamp.', `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last edit (default is created)', `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime', @@ -1199,6 +1206,7 @@ CREATE TABLE IF NOT EXISTS `post` ( INDEX `parent-uri-id` (`parent-uri-id`), INDEX `thr-parent-id` (`thr-parent-id`), INDEX `external-id` (`external-id`), + INDEX `replies-id` (`replies-id`), INDEX `owner-id` (`owner-id`), INDEX `author-id` (`author-id`), INDEX `causer-id` (`causer-id`), @@ -1207,6 +1215,7 @@ CREATE TABLE IF NOT EXISTS `post` ( FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`thr-parent-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`external-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`replies-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`author-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`causer-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, @@ -1347,7 +1356,7 @@ CREATE TABLE IF NOT EXISTS `post-engagement` ( `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner', `contact-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Person, organisation, news, community, relay', - `media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio', + `media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio)', `language` char(2) COMMENT 'Language information about this post in the ISO 639-1 format', `searchtext` mediumtext COMMENT 'Simplified text for the full text search', `size` int unsigned COMMENT 'Body size', @@ -1439,6 +1448,36 @@ CREATE TABLE IF NOT EXISTS `post-media` ( FOREIGN KEY (`media-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media'; +-- +-- TABLE post-origin +-- +CREATE TABLE IF NOT EXISTS `post-origin` ( + `id` int unsigned NOT NULL, + `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', + `uid` mediumint unsigned NOT NULL COMMENT 'Owner id which owns this copy of the item', + `parent-uri-id` int unsigned COMMENT 'Id of the item-uri table that contains the parent uri', + `thr-parent-id` int unsigned COMMENT 'Id of the item-uri table that contains the thread parent uri', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation timestamp.', + `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime', + `gravity` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', + `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs', + `private` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted', + `wall` boolean NOT NULL DEFAULT '0' COMMENT 'This item was posted to the wall of uid', + PRIMARY KEY(`id`), + UNIQUE INDEX `uid_uri-id` (`uid`,`uri-id`), + INDEX `uri-id` (`uri-id`), + INDEX `parent-uri-id` (`parent-uri-id`), + INDEX `thr-parent-id` (`thr-parent-id`), + INDEX `vid` (`vid`), + INDEX `parent-uri-id_uid` (`parent-uri-id`,`uid`), + INDEX `uid_wall_received` (`uid`,`wall`,`received`), + FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`thr-parent-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`vid`) REFERENCES `verb` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Posts from local users'; + -- -- TABLE post-question -- @@ -1471,7 +1510,7 @@ CREATE TABLE IF NOT EXISTS `post-question-option` ( CREATE TABLE IF NOT EXISTS `post-searchindex` ( `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner', - `media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio', + `media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio)', `language` char(2) COMMENT 'Language information about this post in the ISO 639-1 format', `searchtext` mediumtext COMMENT 'Simplified text for the full text search', `size` int unsigned COMMENT 'Body size', @@ -1506,6 +1545,7 @@ CREATE TABLE IF NOT EXISTS `post-tag` ( -- CREATE TABLE IF NOT EXISTS `post-thread` ( `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', + `context-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the endpoint for the context collection', `conversation-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the conversation uri', `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner', `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item author', @@ -1516,6 +1556,7 @@ CREATE TABLE IF NOT EXISTS `post-thread` ( `changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date that something in the conversation changed, indicating clients should fetch the conversation again', `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`uri-id`), + INDEX `context-id` (`context-id`), INDEX `conversation-id` (`conversation-id`), INDEX `owner-id` (`owner-id`), INDEX `author-id` (`author-id`), @@ -1523,6 +1564,7 @@ CREATE TABLE IF NOT EXISTS `post-thread` ( INDEX `received` (`received`), INDEX `commented` (`commented`), FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`context-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`conversation-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`author-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, @@ -1538,6 +1580,7 @@ CREATE TABLE IF NOT EXISTS `post-user` ( `parent-uri-id` int unsigned COMMENT 'Id of the item-uri table that contains the parent uri', `thr-parent-id` int unsigned COMMENT 'Id of the item-uri table that contains the thread parent uri', `external-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the external uri', + `replies-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the endpoint for the replies collection', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Creation timestamp.', `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last edit (default is created)', `received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime', @@ -1550,6 +1593,7 @@ CREATE TABLE IF NOT EXISTS `post-user` ( `post-reason` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Reason why the post arrived at the user', `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs', `private` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted', + `restrictions` tinyint unsigned COMMENT 'Bit array of post restrictions (1 = Reply, 2 = Like, 4 = Announce)', `global` boolean NOT NULL DEFAULT '0' COMMENT '', `visible` boolean NOT NULL DEFAULT '0' COMMENT '', `deleted` boolean NOT NULL DEFAULT '0' COMMENT 'item has been marked for deletion', @@ -1569,6 +1613,7 @@ CREATE TABLE IF NOT EXISTS `post-user` ( INDEX `parent-uri-id` (`parent-uri-id`), INDEX `thr-parent-id` (`thr-parent-id`), INDEX `external-id` (`external-id`), + INDEX `replies-id` (`replies-id`), INDEX `owner-id` (`owner-id`), INDEX `author-id` (`author-id`), INDEX `causer-id` (`causer-id`), @@ -1589,6 +1634,7 @@ CREATE TABLE IF NOT EXISTS `post-user` ( FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`thr-parent-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`external-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`replies-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`author-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`causer-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, @@ -1604,6 +1650,7 @@ CREATE TABLE IF NOT EXISTS `post-user` ( -- CREATE TABLE IF NOT EXISTS `post-thread-user` ( `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', + `context-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the endpoint for the context collection', `conversation-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the conversation uri', `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner', `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item author', @@ -1629,6 +1676,7 @@ CREATE TABLE IF NOT EXISTS `post-thread-user` ( `post-user-id` int unsigned COMMENT 'Id of the post-user table', PRIMARY KEY(`uid`,`uri-id`), INDEX `uri-id` (`uri-id`), + INDEX `context-id` (`context-id`), INDEX `conversation-id` (`conversation-id`), INDEX `owner-id` (`owner-id`), INDEX `author-id` (`author-id`), @@ -1651,6 +1699,7 @@ CREATE TABLE IF NOT EXISTS `post-thread-user` ( INDEX `contact-id_received` (`contact-id`,`received`), INDEX `contact-id_created` (`contact-id`,`created`), FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`context-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`conversation-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`author-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, @@ -1947,6 +1996,7 @@ CREATE TABLE IF NOT EXISTS `user-contact` ( `ignored` boolean COMMENT 'Posts from this contact are ignored', `collapsed` boolean COMMENT 'Posts from this contact are collapsed', `hidden` boolean COMMENT 'This contact is hidden from the others', + `channel-only` boolean COMMENT 'This contact is displayed only in channels, but not in the network stream.', `is-blocked` boolean COMMENT 'User is blocked by this contact', `channel-frequency` tinyint unsigned COMMENT 'Controls the frequency of the appearance of this contact in channels', `pending` boolean COMMENT '', @@ -2065,6 +2115,38 @@ CREATE VIEW `post-counts-view` AS SELECT FROM `post-counts` INNER JOIN `verb` ON `verb`.`id` = `post-counts`.`vid`; +-- +-- VIEW post-engagement-user-view +-- +DROP VIEW IF EXISTS `post-engagement-user-view`; +CREATE VIEW `post-engagement-user-view` AS SELECT + `post-thread-user`.`uid` AS `uid`, + `post-engagement`.`uri-id` AS `uri-id`, + `post-engagement`.`owner-id` AS `owner-id`, + `post-engagement`.`media-type` AS `media-type`, + `post-engagement`.`language` AS `language`, + `post-engagement`.`searchtext` AS `searchtext`, + `post-engagement`.`size` AS `size`, + `post-thread-user`.`commented` AS `commented`, + `post-thread-user`.`received` AS `received`, + `post-thread-user`.`created` AS `created`, + `post-thread-user`.`network` AS `network`, + `post-engagement`.`language` AS `restricted`, + 0 AS `comments`, + 0 AS `activities` + FROM `post-thread-user` + INNER JOIN `post-engagement` ON `post-engagement`.`uri-id` = `post-thread-user`.`uri-id` + INNER JOIN `post-user` ON `post-user`.`id` = `post-thread-user`.`post-user-id` + STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id` + STRAIGHT_JOIN `contact` AS `authorcontact` ON `authorcontact`.`id` = `post-thread-user`.`author-id` + STRAIGHT_JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id` + WHERE `post-user`.`visible` AND NOT `post-user`.`deleted` + AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`) + AND (`post-thread-user`.`hidden` IS NULL OR NOT `post-thread-user`.`hidden`) + AND NOT `authorcontact`.`blocked` AND NOT `ownercontact`.`blocked` + AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = `post-thread-user`.`uid` AND `cid` IN (`authorcontact`.`id`, `ownercontact`.`id`) AND (`blocked` OR `ignored`)) + AND NOT EXISTS(SELECT `gsid` FROM `user-gserver` WHERE `uid` = `post-thread-user`.`uid` AND `gsid` IN (`authorcontact`.`gsid`, `ownercontact`.`gsid`) AND `ignored`); + -- -- VIEW post-timeline-view -- @@ -2110,6 +2192,52 @@ CREATE VIEW `post-timeline-view` AS SELECT STRAIGHT_JOIN `contact` AS `owner` ON `owner`.`id` = `post-user`.`owner-id` LEFT JOIN `contact` AS `causer` ON `causer`.`id` = `post-user`.`causer-id`; +-- +-- VIEW post-timeline-origin-view +-- +DROP VIEW IF EXISTS `post-timeline-origin-view`; +CREATE VIEW `post-timeline-origin-view` AS SELECT + `post-origin`.`uid` AS `uid`, + `post-origin`.`uri-id` AS `uri-id`, + `post-origin`.`gravity` AS `gravity`, + `post-origin`.`created` AS `created`, + `post-user`.`edited` AS `edited`, + `post-thread-user`.`commented` AS `commented`, + `post-origin`.`received` AS `received`, + `post-thread-user`.`changed` AS `changed`, + `post-origin`.`private` AS `private`, + `post-user`.`visible` AS `visible`, + `post-user`.`deleted` AS `deleted`, + true AS `origin`, + `post-user`.`global` AS `global`, + `post-user`.`network` AS `network`, + `post-user`.`protocol` AS `protocol`, + `post-origin`.`vid` AS `vid`, + `post-user`.`contact-id` AS `contact-id`, + `contact`.`blocked` AS `contact-blocked`, + `contact`.`readonly` AS `contact-readonly`, + `contact`.`pending` AS `contact-pending`, + `contact`.`rel` AS `contact-rel`, + `contact`.`uid` AS `contact-uid`, + `contact`.`self` AS `self`, + `post-user`.`author-id` AS `author-id`, + `author`.`blocked` AS `author-blocked`, + `author`.`hidden` AS `author-hidden`, + `author`.`gsid` AS `author-gsid`, + `post-user`.`owner-id` AS `owner-id`, + `owner`.`blocked` AS `owner-blocked`, + `owner`.`gsid` AS `owner-gsid`, + `post-user`.`causer-id` AS `causer-id`, + `causer`.`blocked` AS `causer-blocked`, + `causer`.`gsid` AS `causer-gsid` + FROM `post-origin` + INNER JOIN `post-user` ON `post-user`.`id` = `post-origin`.`id` + LEFT JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-origin`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-origin`.`uid` + STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-user`.`contact-id` + STRAIGHT_JOIN `contact` AS `author` ON `author`.`id` = `post-user`.`author-id` + STRAIGHT_JOIN `contact` AS `owner` ON `owner`.`id` = `post-user`.`owner-id` + LEFT JOIN `contact` AS `causer` ON `causer`.`id` = `post-user`.`causer-id`; + -- -- VIEW post-searchindex-user-view -- @@ -2142,6 +2270,392 @@ CREATE VIEW `post-searchindex-user-view` AS SELECT AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = `post-thread-user`.`uid` AND `cid` IN (`authorcontact`.`id`, `ownercontact`.`id`) AND (`blocked` OR `ignored`)) AND NOT EXISTS(SELECT `gsid` FROM `user-gserver` WHERE `uid` = `post-thread-user`.`uid` AND `gsid` IN (`authorcontact`.`gsid`, `ownercontact`.`gsid`) AND `ignored`); +-- +-- VIEW post-origin-view +-- +DROP VIEW IF EXISTS `post-origin-view`; +CREATE VIEW `post-origin-view` AS SELECT + `post-origin`.`id` AS `id`, + `post-origin`.`id` AS `post-user-id`, + `post-origin`.`uid` AS `uid`, + `post-thread-user`.`post-user-id` AS `parent`, + `item-uri`.`uri` AS `uri`, + `post-origin`.`uri-id` AS `uri-id`, + `parent-item-uri`.`uri` AS `parent-uri`, + `post-origin`.`parent-uri-id` AS `parent-uri-id`, + `thr-parent-item-uri`.`uri` AS `thr-parent`, + `post-origin`.`thr-parent-id` AS `thr-parent-id`, + `conversation-item-uri`.`uri` AS `conversation`, + `post-thread-user`.`conversation-id` AS `conversation-id`, + `context-item-uri`.`uri` AS `context`, + `post-thread-user`.`context-id` AS `context-id`, + `quote-item-uri`.`uri` AS `quote-uri`, + `post-content`.`quote-uri-id` AS `quote-uri-id`, + `item-uri`.`guid` AS `guid`, + `post-origin`.`wall` AS `wall`, + `post-origin`.`gravity` AS `gravity`, + `external-item-uri`.`uri` AS `extid`, + `post-user`.`external-id` AS `external-id`, + `replies-item-uri`.`uri` AS `replies`, + `post-user`.`replies-id` AS `replies-id`, + `post-origin`.`created` AS `created`, + `post-user`.`edited` AS `edited`, + `post-thread-user`.`commented` AS `commented`, + `post-origin`.`received` AS `received`, + `post-thread-user`.`changed` AS `changed`, + `post-user`.`post-type` AS `post-type`, + `post-user`.`post-reason` AS `post-reason`, + `post-origin`.`private` AS `private`, + `post-thread-user`.`pubmail` AS `pubmail`, + `post-user`.`visible` AS `visible`, + `post-thread-user`.`starred` AS `starred`, + `post-user`.`unseen` AS `unseen`, + `post-user`.`deleted` AS `deleted`, + true AS `origin`, + `post-thread-user`.`origin` AS `parent-origin`, + `post-thread-user`.`mention` AS `mention`, + `post-user`.`global` AS `global`, + EXISTS(SELECT `type` FROM `post-collection` WHERE `type` = 0 AND `uri-id` = `post-origin`.`uri-id`) AS `featured`, + `post-user`.`network` AS `network`, + `post-user`.`protocol` AS `protocol`, + `post-origin`.`vid` AS `vid`, + `post-user`.`psid` AS `psid`, + IF (`post-origin`.`vid` IS NULL, '', `verb`.`name`) AS `verb`, + `post-content`.`title` AS `title`, + `post-content`.`content-warning` AS `content-warning`, + `post-content`.`raw-body` AS `raw-body`, + IFNULL (`post-content`.`body`, '') AS `body`, + `post-content`.`rendered-hash` AS `rendered-hash`, + `post-content`.`rendered-html` AS `rendered-html`, + `post-content`.`language` AS `language`, + `post-content`.`plink` AS `plink`, + `post-content`.`location` AS `location`, + `post-content`.`coord` AS `coord`, + `post-content`.`sensitive` AS `sensitive`, + `post-user`.`restrictions` AS `restrictions`, + `post-content`.`app` AS `app`, + `post-content`.`object-type` AS `object-type`, + `post-content`.`object` AS `object`, + `post-content`.`target-type` AS `target-type`, + `post-content`.`target` AS `target`, + `post-content`.`resource-id` AS `resource-id`, + `post-user`.`contact-id` AS `contact-id`, + `contact`.`uri-id` AS `contact-uri-id`, + `contact`.`url` AS `contact-link`, + `contact`.`addr` AS `contact-addr`, + `contact`.`name` AS `contact-name`, + `contact`.`nick` AS `contact-nick`, + `contact`.`thumb` AS `contact-avatar`, + `contact`.`network` AS `contact-network`, + `contact`.`blocked` AS `contact-blocked`, + `contact`.`hidden` AS `contact-hidden`, + `contact`.`readonly` AS `contact-readonly`, + `contact`.`archive` AS `contact-archive`, + `contact`.`pending` AS `contact-pending`, + `contact`.`rel` AS `contact-rel`, + `contact`.`uid` AS `contact-uid`, + `contact`.`contact-type` AS `contact-contact-type`, + IF (`post-user`.`network` IN ('apub', 'dfrn', 'dspr', 'stat'), true, `contact`.`writable`) AS `writable`, + `contact`.`self` AS `self`, + `contact`.`id` AS `cid`, + `contact`.`alias` AS `alias`, + `contact`.`photo` AS `photo`, + `contact`.`name-date` AS `name-date`, + `contact`.`uri-date` AS `uri-date`, + `contact`.`avatar-date` AS `avatar-date`, + `contact`.`thumb` AS `thumb`, + `post-user`.`author-id` AS `author-id`, + `author`.`uri-id` AS `author-uri-id`, + `author`.`url` AS `author-link`, + `author`.`addr` AS `author-addr`, + IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`) AS `author-name`, + `author`.`nick` AS `author-nick`, + `author`.`alias` AS `author-alias`, + IF (`contact`.`url` = `author`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `author`.`thumb`) AS `author-avatar`, + `author`.`network` AS `author-network`, + `author`.`blocked` AS `author-blocked`, + `author`.`hidden` AS `author-hidden`, + `author`.`updated` AS `author-updated`, + `author`.`contact-type` AS `author-contact-type`, + `author`.`gsid` AS `author-gsid`, + `author`.`baseurl` AS `author-baseurl`, + `post-user`.`owner-id` AS `owner-id`, + `owner`.`uri-id` AS `owner-uri-id`, + `owner`.`url` AS `owner-link`, + `owner`.`addr` AS `owner-addr`, + IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`) AS `owner-name`, + `owner`.`nick` AS `owner-nick`, + `owner`.`alias` AS `owner-alias`, + IF (`contact`.`url` = `owner`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `owner`.`thumb`) AS `owner-avatar`, + `owner`.`network` AS `owner-network`, + `owner`.`blocked` AS `owner-blocked`, + `owner`.`hidden` AS `owner-hidden`, + `owner`.`updated` AS `owner-updated`, + `owner`.`gsid` AS `owner-gsid`, + `owner`.`contact-type` AS `owner-contact-type`, + `post-user`.`causer-id` AS `causer-id`, + `causer`.`uri-id` AS `causer-uri-id`, + `causer`.`url` AS `causer-link`, + `causer`.`addr` AS `causer-addr`, + `causer`.`name` AS `causer-name`, + `causer`.`nick` AS `causer-nick`, + `causer`.`alias` AS `causer-alias`, + `causer`.`thumb` AS `causer-avatar`, + `causer`.`network` AS `causer-network`, + `causer`.`blocked` AS `causer-blocked`, + `causer`.`hidden` AS `causer-hidden`, + `causer`.`gsid` AS `causer-gsid`, + `causer`.`contact-type` AS `causer-contact-type`, + `post-delivery-data`.`postopts` AS `postopts`, + `post-delivery-data`.`inform` AS `inform`, + `post-delivery-data`.`queue_count` AS `delivery_queue_count`, + `post-delivery-data`.`queue_done` AS `delivery_queue_done`, + `post-delivery-data`.`queue_failed` AS `delivery_queue_failed`, + IF (`post-user`.`psid` IS NULL, '', `permissionset`.`allow_cid`) AS `allow_cid`, + IF (`post-user`.`psid` IS NULL, '', `permissionset`.`allow_gid`) AS `allow_gid`, + IF (`post-user`.`psid` IS NULL, '', `permissionset`.`deny_cid`) AS `deny_cid`, + IF (`post-user`.`psid` IS NULL, '', `permissionset`.`deny_gid`) AS `deny_gid`, + `post-user`.`event-id` AS `event-id`, + `event`.`created` AS `event-created`, + `event`.`edited` AS `event-edited`, + `event`.`start` AS `event-start`, + `event`.`finish` AS `event-finish`, + `event`.`summary` AS `event-summary`, + `event`.`desc` AS `event-desc`, + `event`.`location` AS `event-location`, + `event`.`type` AS `event-type`, + `event`.`nofinish` AS `event-nofinish`, + `event`.`ignore` AS `event-ignore`, + `post-question`.`id` AS `question-id`, + `post-question`.`multiple` AS `question-multiple`, + `post-question`.`voters` AS `question-voters`, + `post-question`.`end-time` AS `question-end-time`, + EXISTS(SELECT `uri-id` FROM `post-category` WHERE `post-category`.`uri-id` = `post-origin`.`uri-id` AND `post-category`.`uid` = `post-origin`.`uid`) AS `has-categories`, + EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-origin`.`uri-id`) AS `has-media`, + `diaspora-interaction`.`interaction` AS `signed_text`, + `parent-item-uri`.`guid` AS `parent-guid`, + `post-thread-user`.`network` AS `parent-network`, + `post-thread-user`.`author-id` AS `parent-author-id`, + `parent-post-author`.`url` AS `parent-author-link`, + `parent-post-author`.`name` AS `parent-author-name`, + `parent-post-author`.`nick` AS `parent-author-nick`, + `parent-post-author`.`network` AS `parent-author-network` + FROM `post-origin` + INNER JOIN `post-user` ON `post-user`.`id` = `post-origin`.`id` + INNER JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-origin`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-origin`.`uid` + STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-user`.`contact-id` + STRAIGHT_JOIN `contact` AS `author` ON `author`.`id` = `post-user`.`author-id` + STRAIGHT_JOIN `contact` AS `owner` ON `owner`.`id` = `post-user`.`owner-id` + LEFT JOIN `contact` AS `causer` ON `causer`.`id` = `post-user`.`causer-id` + LEFT JOIN `item-uri` ON `item-uri`.`id` = `post-origin`.`uri-id` + LEFT JOIN `item-uri` AS `thr-parent-item-uri` ON `thr-parent-item-uri`.`id` = `post-origin`.`thr-parent-id` + LEFT JOIN `item-uri` AS `parent-item-uri` ON `parent-item-uri`.`id` = `post-origin`.`parent-uri-id` + LEFT JOIN `item-uri` AS `conversation-item-uri` ON `conversation-item-uri`.`id` = `post-thread-user`.`conversation-id` + LEFT JOIN `item-uri` AS `context-item-uri` ON `context-item-uri`.`id` = `post-thread-user`.`context-id` + LEFT JOIN `item-uri` AS `external-item-uri` ON `external-item-uri`.`id` = `post-user`.`external-id` + LEFT JOIN `item-uri` AS `replies-item-uri` ON `replies-item-uri`.`id` = `post-user`.`replies-id` + LEFT JOIN `verb` ON `verb`.`id` = `post-origin`.`vid` + LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` + LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` + LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `permissionset` ON `permissionset`.`id` = `post-user`.`psid` + LEFT JOIN `contact` AS `parent-post-author` ON `parent-post-author`.`id` = `post-thread-user`.`author-id`; + +-- +-- VIEW post-thread-origin-view +-- +DROP VIEW IF EXISTS `post-thread-origin-view`; +CREATE VIEW `post-thread-origin-view` AS SELECT + `post-origin`.`id` AS `id`, + `post-origin`.`id` AS `post-user-id`, + `post-origin`.`uid` AS `uid`, + `post-thread-user`.`post-user-id` AS `parent`, + `item-uri`.`uri` AS `uri`, + `post-origin`.`uri-id` AS `uri-id`, + `parent-item-uri`.`uri` AS `parent-uri`, + `post-origin`.`parent-uri-id` AS `parent-uri-id`, + `thr-parent-item-uri`.`uri` AS `thr-parent`, + `post-origin`.`thr-parent-id` AS `thr-parent-id`, + `conversation-item-uri`.`uri` AS `conversation`, + `post-thread-user`.`conversation-id` AS `conversation-id`, + `context-item-uri`.`uri` AS `context`, + `post-thread-user`.`context-id` AS `context-id`, + `quote-item-uri`.`uri` AS `quote-uri`, + `post-content`.`quote-uri-id` AS `quote-uri-id`, + `item-uri`.`guid` AS `guid`, + `post-origin`.`wall` AS `wall`, + `post-origin`.`gravity` AS `gravity`, + `external-item-uri`.`uri` AS `extid`, + `post-user`.`external-id` AS `external-id`, + `replies-item-uri`.`uri` AS `replies`, + `post-user`.`replies-id` AS `replies-id`, + `post-origin`.`created` AS `created`, + `post-user`.`edited` AS `edited`, + `post-thread-user`.`commented` AS `commented`, + `post-origin`.`received` AS `received`, + `post-thread-user`.`changed` AS `changed`, + `post-user`.`post-type` AS `post-type`, + `post-user`.`post-reason` AS `post-reason`, + `post-origin`.`private` AS `private`, + `post-thread-user`.`pubmail` AS `pubmail`, + `post-thread-user`.`ignored` AS `ignored`, + `post-user`.`visible` AS `visible`, + `post-thread-user`.`starred` AS `starred`, + `post-thread-user`.`unseen` AS `unseen`, + `post-user`.`deleted` AS `deleted`, + true AS `origin`, + `post-thread-user`.`mention` AS `mention`, + `post-user`.`global` AS `global`, + EXISTS(SELECT `type` FROM `post-collection` WHERE `type` = 0 AND `uri-id` = `post-thread-user`.`uri-id`) AS `featured`, + `post-thread-user`.`network` AS `network`, + `post-origin`.`vid` AS `vid`, + `post-thread-user`.`psid` AS `psid`, + IF (`post-origin`.`vid` IS NULL, '', `verb`.`name`) AS `verb`, + `post-content`.`title` AS `title`, + `post-content`.`content-warning` AS `content-warning`, + `post-content`.`raw-body` AS `raw-body`, + `post-content`.`body` AS `body`, + `post-content`.`rendered-hash` AS `rendered-hash`, + `post-content`.`rendered-html` AS `rendered-html`, + `post-content`.`language` AS `language`, + `post-content`.`plink` AS `plink`, + `post-content`.`location` AS `location`, + `post-content`.`coord` AS `coord`, + `post-content`.`sensitive` AS `sensitive`, + `post-user`.`restrictions` AS `restrictions`, + `post-content`.`app` AS `app`, + `post-content`.`object-type` AS `object-type`, + `post-content`.`object` AS `object`, + `post-content`.`target-type` AS `target-type`, + `post-content`.`target` AS `target`, + `post-content`.`resource-id` AS `resource-id`, + `post-thread-user`.`contact-id` AS `contact-id`, + `contact`.`uri-id` AS `contact-uri-id`, + `contact`.`url` AS `contact-link`, + `contact`.`addr` AS `contact-addr`, + `contact`.`name` AS `contact-name`, + `contact`.`nick` AS `contact-nick`, + `contact`.`thumb` AS `contact-avatar`, + `contact`.`network` AS `contact-network`, + `contact`.`blocked` AS `contact-blocked`, + `contact`.`hidden` AS `contact-hidden`, + `contact`.`readonly` AS `contact-readonly`, + `contact`.`archive` AS `contact-archive`, + `contact`.`pending` AS `contact-pending`, + `contact`.`rel` AS `contact-rel`, + `contact`.`uid` AS `contact-uid`, + `contact`.`gsid` AS `contact-gsid`, + `contact`.`contact-type` AS `contact-contact-type`, + IF (`post-user`.`network` IN ('apub', 'dfrn', 'dspr', 'stat'), true, `contact`.`writable`) AS `writable`, + `contact`.`self` AS `self`, + `contact`.`id` AS `cid`, + `contact`.`alias` AS `alias`, + `contact`.`photo` AS `photo`, + `contact`.`name-date` AS `name-date`, + `contact`.`uri-date` AS `uri-date`, + `contact`.`avatar-date` AS `avatar-date`, + `contact`.`thumb` AS `thumb`, + `post-thread-user`.`author-id` AS `author-id`, + `author`.`uri-id` AS `author-uri-id`, + `author`.`url` AS `author-link`, + `author`.`addr` AS `author-addr`, + IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`) AS `author-name`, + `author`.`nick` AS `author-nick`, + `author`.`alias` AS `author-alias`, + IF (`contact`.`url` = `author`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `author`.`thumb`) AS `author-avatar`, + `author`.`network` AS `author-network`, + `author`.`blocked` AS `author-blocked`, + `author`.`hidden` AS `author-hidden`, + `author`.`updated` AS `author-updated`, + `author`.`contact-type` AS `author-contact-type`, + `author`.`gsid` AS `author-gsid`, + `post-thread-user`.`owner-id` AS `owner-id`, + `owner`.`uri-id` AS `owner-uri-id`, + `owner`.`url` AS `owner-link`, + `owner`.`addr` AS `owner-addr`, + IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`) AS `owner-name`, + `owner`.`nick` AS `owner-nick`, + `owner`.`alias` AS `owner-alias`, + IF (`contact`.`url` = `owner`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `owner`.`thumb`) AS `owner-avatar`, + `owner`.`network` AS `owner-network`, + `owner`.`blocked` AS `owner-blocked`, + `owner`.`hidden` AS `owner-hidden`, + `owner`.`updated` AS `owner-updated`, + `owner`.`gsid` AS `owner-gsid`, + `owner`.`contact-type` AS `owner-contact-type`, + `post-thread-user`.`causer-id` AS `causer-id`, + `causer`.`uri-id` AS `causer-uri-id`, + `causer`.`url` AS `causer-link`, + `causer`.`addr` AS `causer-addr`, + `causer`.`name` AS `causer-name`, + `causer`.`nick` AS `causer-nick`, + `causer`.`alias` AS `causer-alias`, + `causer`.`thumb` AS `causer-avatar`, + `causer`.`network` AS `causer-network`, + `causer`.`blocked` AS `causer-blocked`, + `causer`.`hidden` AS `causer-hidden`, + `causer`.`gsid` AS `causer-gsid`, + `causer`.`contact-type` AS `causer-contact-type`, + `post-delivery-data`.`postopts` AS `postopts`, + `post-delivery-data`.`inform` AS `inform`, + `post-delivery-data`.`queue_count` AS `delivery_queue_count`, + `post-delivery-data`.`queue_done` AS `delivery_queue_done`, + `post-delivery-data`.`queue_failed` AS `delivery_queue_failed`, + IF (`post-thread-user`.`psid` IS NULL, '', `permissionset`.`allow_cid`) AS `allow_cid`, + IF (`post-thread-user`.`psid` IS NULL, '', `permissionset`.`allow_gid`) AS `allow_gid`, + IF (`post-thread-user`.`psid` IS NULL, '', `permissionset`.`deny_cid`) AS `deny_cid`, + IF (`post-thread-user`.`psid` IS NULL, '', `permissionset`.`deny_gid`) AS `deny_gid`, + `post-user`.`event-id` AS `event-id`, + `event`.`created` AS `event-created`, + `event`.`edited` AS `event-edited`, + `event`.`start` AS `event-start`, + `event`.`finish` AS `event-finish`, + `event`.`summary` AS `event-summary`, + `event`.`desc` AS `event-desc`, + `event`.`location` AS `event-location`, + `event`.`type` AS `event-type`, + `event`.`nofinish` AS `event-nofinish`, + `event`.`ignore` AS `event-ignore`, + `post-question`.`id` AS `question-id`, + `post-question`.`multiple` AS `question-multiple`, + `post-question`.`voters` AS `question-voters`, + `post-question`.`end-time` AS `question-end-time`, + EXISTS(SELECT `uri-id` FROM `post-category` WHERE `post-category`.`uri-id` = `post-thread-user`.`uri-id` AND `post-category`.`uid` = `post-thread-user`.`uid`) AS `has-categories`, + EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-thread-user`.`uri-id`) AS `has-media`, + `diaspora-interaction`.`interaction` AS `signed_text`, + `parent-item-uri`.`guid` AS `parent-guid`, + `post-thread-user`.`network` AS `parent-network`, + `post-thread-user`.`author-id` AS `parent-author-id`, + `author`.`url` AS `parent-author-link`, + `author`.`name` AS `parent-author-name`, + `author`.`nick` AS `parent-author-nick`, + `author`.`network` AS `parent-author-network` + FROM `post-origin` + INNER JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-origin`.`uri-id` AND `post-thread-user`.`uid` = `post-origin`.`uid` + INNER JOIN `post-user` ON `post-user`.`id` = `post-origin`.`id` + STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id` + STRAIGHT_JOIN `contact` AS `author` ON `author`.`id` = `post-thread-user`.`author-id` + STRAIGHT_JOIN `contact` AS `owner` ON `owner`.`id` = `post-thread-user`.`owner-id` + LEFT JOIN `contact` AS `causer` ON `causer`.`id` = `post-thread-user`.`causer-id` + LEFT JOIN `item-uri` ON `item-uri`.`id` = `post-origin`.`uri-id` + LEFT JOIN `item-uri` AS `thr-parent-item-uri` ON `thr-parent-item-uri`.`id` = `post-origin`.`thr-parent-id` + LEFT JOIN `item-uri` AS `parent-item-uri` ON `parent-item-uri`.`id` = `post-origin`.`parent-uri-id` + LEFT JOIN `item-uri` AS `conversation-item-uri` ON `conversation-item-uri`.`id` = `post-thread-user`.`conversation-id` + LEFT JOIN `item-uri` AS `context-item-uri` ON `context-item-uri`.`id` = `post-thread-user`.`context-id` + LEFT JOIN `item-uri` AS `external-item-uri` ON `external-item-uri`.`id` = `post-user`.`external-id` + LEFT JOIN `item-uri` AS `replies-item-uri` ON `replies-item-uri`.`id` = `post-user`.`replies-id` + LEFT JOIN `verb` ON `verb`.`id` = `post-origin`.`vid` + LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` + LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` + LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-origin`.`uri-id` + LEFT JOIN `permissionset` ON `permissionset`.`id` = `post-thread-user`.`psid`; + -- -- VIEW post-user-view -- @@ -2159,6 +2673,8 @@ CREATE VIEW `post-user-view` AS SELECT `post-user`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread-user`.`conversation-id` AS `conversation-id`, + `context-item-uri`.`uri` AS `context`, + `post-thread-user`.`context-id` AS `context-id`, `quote-item-uri`.`uri` AS `quote-uri`, `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, @@ -2166,6 +2682,8 @@ CREATE VIEW `post-user-view` AS SELECT `post-user`.`gravity` AS `gravity`, `external-item-uri`.`uri` AS `extid`, `post-user`.`external-id` AS `external-id`, + `replies-item-uri`.`uri` AS `replies`, + `post-user`.`replies-id` AS `replies-id`, `post-user`.`created` AS `created`, `post-user`.`edited` AS `edited`, `post-thread-user`.`commented` AS `commented`, @@ -2200,6 +2718,7 @@ CREATE VIEW `post-user-view` AS SELECT `post-content`.`location` AS `location`, `post-content`.`coord` AS `coord`, `post-content`.`sensitive` AS `sensitive`, + `post-user`.`restrictions` AS `restrictions`, `post-content`.`app` AS `app`, `post-content`.`object-type` AS `object-type`, `post-content`.`object` AS `object`, @@ -2317,7 +2836,9 @@ CREATE VIEW `post-user-view` AS SELECT LEFT JOIN `item-uri` AS `thr-parent-item-uri` ON `thr-parent-item-uri`.`id` = `post-user`.`thr-parent-id` LEFT JOIN `item-uri` AS `parent-item-uri` ON `parent-item-uri`.`id` = `post-user`.`parent-uri-id` LEFT JOIN `item-uri` AS `conversation-item-uri` ON `conversation-item-uri`.`id` = `post-thread-user`.`conversation-id` + LEFT JOIN `item-uri` AS `context-item-uri` ON `context-item-uri`.`id` = `post-thread-user`.`context-id` LEFT JOIN `item-uri` AS `external-item-uri` ON `external-item-uri`.`id` = `post-user`.`external-id` + LEFT JOIN `item-uri` AS `replies-item-uri` ON `replies-item-uri`.`id` = `post-user`.`replies-id` LEFT JOIN `verb` ON `verb`.`id` = `post-user`.`vid` LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-user`.`uri-id` @@ -2345,6 +2866,8 @@ CREATE VIEW `post-thread-user-view` AS SELECT `post-user`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread-user`.`conversation-id` AS `conversation-id`, + `context-item-uri`.`uri` AS `context`, + `post-thread-user`.`context-id` AS `context-id`, `quote-item-uri`.`uri` AS `quote-uri`, `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, @@ -2352,6 +2875,8 @@ CREATE VIEW `post-thread-user-view` AS SELECT `post-user`.`gravity` AS `gravity`, `external-item-uri`.`uri` AS `extid`, `post-user`.`external-id` AS `external-id`, + `replies-item-uri`.`uri` AS `replies`, + `post-user`.`replies-id` AS `replies-id`, `post-thread-user`.`created` AS `created`, `post-user`.`edited` AS `edited`, `post-thread-user`.`commented` AS `commented`, @@ -2385,6 +2910,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT `post-content`.`location` AS `location`, `post-content`.`coord` AS `coord`, `post-content`.`sensitive` AS `sensitive`, + `post-user`.`restrictions` AS `restrictions`, `post-content`.`app` AS `app`, `post-content`.`object-type` AS `object-type`, `post-content`.`object` AS `object`, @@ -2502,7 +3028,9 @@ CREATE VIEW `post-thread-user-view` AS SELECT LEFT JOIN `item-uri` AS `thr-parent-item-uri` ON `thr-parent-item-uri`.`id` = `post-user`.`thr-parent-id` LEFT JOIN `item-uri` AS `parent-item-uri` ON `parent-item-uri`.`id` = `post-user`.`parent-uri-id` LEFT JOIN `item-uri` AS `conversation-item-uri` ON `conversation-item-uri`.`id` = `post-thread-user`.`conversation-id` + LEFT JOIN `item-uri` AS `context-item-uri` ON `context-item-uri`.`id` = `post-thread-user`.`context-id` LEFT JOIN `item-uri` AS `external-item-uri` ON `external-item-uri`.`id` = `post-user`.`external-id` + LEFT JOIN `item-uri` AS `replies-item-uri` ON `replies-item-uri`.`id` = `post-user`.`replies-id` LEFT JOIN `verb` ON `verb`.`id` = `post-user`.`vid` LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-thread-user`.`uri-id` @@ -2525,12 +3053,16 @@ CREATE VIEW `post-view` AS SELECT `post`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread`.`conversation-id` AS `conversation-id`, + `context-item-uri`.`uri` AS `context`, + `post-thread`.`context-id` AS `context-id`, `quote-item-uri`.`uri` AS `quote-uri`, `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, `post`.`gravity` AS `gravity`, `external-item-uri`.`uri` AS `extid`, `post`.`external-id` AS `external-id`, + `replies-item-uri`.`uri` AS `replies`, + `post`.`replies-id` AS `replies-id`, `post`.`created` AS `created`, `post`.`edited` AS `edited`, `post-thread`.`commented` AS `commented`, @@ -2651,7 +3183,9 @@ CREATE VIEW `post-view` AS SELECT LEFT JOIN `item-uri` AS `thr-parent-item-uri` ON `thr-parent-item-uri`.`id` = `post`.`thr-parent-id` LEFT JOIN `item-uri` AS `parent-item-uri` ON `parent-item-uri`.`id` = `post`.`parent-uri-id` LEFT JOIN `item-uri` AS `conversation-item-uri` ON `conversation-item-uri`.`id` = `post-thread`.`conversation-id` + LEFT JOIN `item-uri` AS `context-item-uri` ON `context-item-uri`.`id` = `post-thread`.`context-id` LEFT JOIN `item-uri` AS `external-item-uri` ON `external-item-uri`.`id` = `post`.`external-id` + LEFT JOIN `item-uri` AS `replies-item-uri` ON `replies-item-uri`.`id` = `post`.`replies-id` LEFT JOIN `verb` ON `verb`.`id` = `post`.`vid` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post`.`uri-id` @@ -2672,12 +3206,16 @@ CREATE VIEW `post-thread-view` AS SELECT `post`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread`.`conversation-id` AS `conversation-id`, + `context-item-uri`.`uri` AS `context`, + `post-thread`.`context-id` AS `context-id`, `quote-item-uri`.`uri` AS `quote-uri`, `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, `post`.`gravity` AS `gravity`, `external-item-uri`.`uri` AS `extid`, `post`.`external-id` AS `external-id`, + `replies-item-uri`.`uri` AS `replies`, + `post`.`replies-id` AS `replies-id`, `post-thread`.`created` AS `created`, `post`.`edited` AS `edited`, `post-thread`.`commented` AS `commented`, @@ -2800,7 +3338,9 @@ CREATE VIEW `post-thread-view` AS SELECT LEFT JOIN `item-uri` AS `thr-parent-item-uri` ON `thr-parent-item-uri`.`id` = `post`.`thr-parent-id` LEFT JOIN `item-uri` AS `parent-item-uri` ON `parent-item-uri`.`id` = `post`.`parent-uri-id` LEFT JOIN `item-uri` AS `conversation-item-uri` ON `conversation-item-uri`.`id` = `post-thread`.`conversation-id` + LEFT JOIN `item-uri` AS `context-item-uri` ON `context-item-uri`.`id` = `post-thread`.`context-id` LEFT JOIN `item-uri` AS `external-item-uri` ON `external-item-uri`.`id` = `post`.`external-id` + LEFT JOIN `item-uri` AS `replies-item-uri` ON `replies-item-uri`.`id` = `post`.`replies-id` LEFT JOIN `verb` ON `verb`.`id` = `post`.`vid` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-thread`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-thread`.`uri-id` @@ -2876,36 +3416,6 @@ CREATE VIEW `tag-view` AS SELECT LEFT JOIN `tag` ON `post-tag`.`tid` = `tag`.`id` LEFT JOIN `contact` ON `post-tag`.`cid` = `contact`.`id`; --- --- VIEW network-item-view --- -DROP VIEW IF EXISTS `network-item-view`; -CREATE VIEW `network-item-view` AS SELECT - `post-user`.`uri-id` AS `uri-id`, - `post-thread-user`.`post-user-id` AS `parent`, - `post-user`.`received` AS `received`, - `post-thread-user`.`commented` AS `commented`, - `post-user`.`created` AS `created`, - `post-user`.`uid` AS `uid`, - `post-thread-user`.`starred` AS `starred`, - `post-thread-user`.`mention` AS `mention`, - `post-user`.`network` AS `network`, - `post-user`.`unseen` AS `unseen`, - `post-user`.`gravity` AS `gravity`, - `post-user`.`contact-id` AS `contact-id`, - `ownercontact`.`contact-type` AS `contact-type` - FROM `post-user` - INNER JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid` - STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id` - STRAIGHT_JOIN `contact` AS `authorcontact` ON `authorcontact`.`id` = `post-thread-user`.`author-id` - STRAIGHT_JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id` - WHERE `post-user`.`visible` AND NOT `post-user`.`deleted` - AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`) - AND (`post-user`.`hidden` IS NULL OR NOT `post-user`.`hidden`) - AND NOT `authorcontact`.`blocked` AND NOT `ownercontact`.`blocked` - AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = `post-thread-user`.`uid` AND `cid` IN (`authorcontact`.`id`, `ownercontact`.`id`) AND (`blocked` OR `ignored`)) - AND NOT EXISTS(SELECT `gsid` FROM `user-gserver` WHERE `uid` = `post-thread-user`.`uid` AND `gsid` IN (`authorcontact`.`gsid`, `ownercontact`.`gsid`) AND `ignored`); - -- -- VIEW network-thread-view -- @@ -2931,8 +3441,36 @@ CREATE VIEW `network-thread-view` AS SELECT AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`) AND (`post-thread-user`.`hidden` IS NULL OR NOT `post-thread-user`.`hidden`) AND NOT `authorcontact`.`blocked` AND NOT `ownercontact`.`blocked` - AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = `post-thread-user`.`uid` AND `cid` IN (`authorcontact`.`id`, `ownercontact`.`id`) AND (`blocked` OR `ignored`)) - AND NOT EXISTS(SELECT `gsid` FROM `user-gserver` WHERE `uid` = `post-thread-user`.`uid` AND `gsid` IN (`authorcontact`.`gsid`, `ownercontact`.`gsid`) AND `ignored`); + AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = `post-thread-user`.`uid` AND `cid` IN (`post-thread-user`.`author-id`, `post-thread-user`.`owner-id`, `post-thread-user`.`causer-id`) AND (`blocked` OR `ignored` OR `channel-only`)) + AND NOT EXISTS(SELECT `gsid` FROM `user-gserver` WHERE `uid` = `post-thread-user`.`uid` AND `gsid` IN (`authorcontact`.`gsid`, `ownercontact`.`gsid`) AND `ignored`); + +-- +-- VIEW network-thread-circle-view +-- +DROP VIEW IF EXISTS `network-thread-circle-view`; +CREATE VIEW `network-thread-circle-view` AS SELECT + `post-thread-user`.`uri-id` AS `uri-id`, + `post-thread-user`.`post-user-id` AS `parent`, + `post-thread-user`.`received` AS `received`, + `post-thread-user`.`commented` AS `commented`, + `post-thread-user`.`created` AS `created`, + `post-thread-user`.`uid` AS `uid`, + `post-thread-user`.`starred` AS `starred`, + `post-thread-user`.`mention` AS `mention`, + `post-thread-user`.`network` AS `network`, + `post-thread-user`.`contact-id` AS `contact-id`, + `ownercontact`.`contact-type` AS `contact-type` + FROM `post-thread-user` + INNER JOIN `post-user` ON `post-user`.`id` = `post-thread-user`.`post-user-id` + STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id` + STRAIGHT_JOIN `contact` AS `authorcontact` ON `authorcontact`.`id` = `post-thread-user`.`author-id` + STRAIGHT_JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id` + WHERE `post-user`.`visible` AND NOT `post-user`.`deleted` + AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`) + AND (`post-thread-user`.`hidden` IS NULL OR NOT `post-thread-user`.`hidden`) + AND NOT `authorcontact`.`blocked` AND NOT `ownercontact`.`blocked` + AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = `post-thread-user`.`uid` AND `cid` IN (`post-thread-user`.`author-id`, `post-thread-user`.`owner-id`, `post-thread-user`.`causer-id`) AND (`blocked` OR `ignored`)) + AND NOT EXISTS(SELECT `gsid` FROM `user-gserver` WHERE `uid` = `post-thread-user`.`uid` AND `gsid` IN (`authorcontact`.`gsid`, `ownercontact`.`gsid`) AND `ignored`); -- -- VIEW owner-view diff --git a/doc/Addons.md b/doc/Addons.md index b89a48d26d..befabfd05a 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -850,10 +850,6 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep- Hook::callAll('register_account', $uid); Hook::callAll('remove_user', $user); -### src/Module/Notifications/Ping.php - - Hook::callAll('network_ping', $arr); - ### src/Module/PermissionTooltip.php Hook::callAll('lockview_content', $item); diff --git a/doc/Channels.md b/doc/Channels.md index 0f5413b1f1..1465c32da2 100644 --- a/doc/Channels.md +++ b/doc/Channels.md @@ -23,7 +23,7 @@ Predefined Channels * For you: Posts from contacts you interact with and who interact with you. In detail, it consists of: * Posts from people you interact with on a more than average level. - * Posts from the accounts that you follow with a more than average number of interactions- + * Posts from the accounts that you follow with a more than average number of interactions. * Posts from accounts where you activated "notify on new posts" or where you have set the channel frequency accordingly. * Discover: Posts from contacts you don't follow, but that might be of interest for you to follow. In detail, it consists of: * Posts from people you don't follow but you interact with on a more than average level. @@ -48,11 +48,11 @@ Each channel is defined by these values: * Label: This value is mandatory and is used for the menu label. * Description: A short description of the content. This can help to keep the overview, when you have got a lot of channels. * Access Key: When you want to access this channel via an access key, you can define it here. Pay attention to not use an already used one. -* Circle: This defines the data source for this channel. By default it is set to the public timeline. There are some predefined values, like the accounts that you follow or the accounts that follow you. Also all of your circles can be selected. +* Circle: This defines the data source for this channel. By default it is set to the public timeline. There are some predefined values, like the accounts that you follow or the accounts that follow you. Also all of your circles can be selected. * Include Tags: Comma separated list of tags. A post will be used when it contains any of the listed tags. -* Exclude Tags: Comma separated list of tags. If a post contain any of these tags, then it will not be part of nthis channel. +* Exclude Tags: Comma separated list of tags. If a post contain any of these tags, then it will not be part of this channel. * Full Text Search: This can be used to include or exclude content, based on the content and some additional keywords. It uses the "boolean mode" operators from MariaDB: https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode -* Images, Videos, Audio: When selected, you will see content with the selected media type. This can be combined. If none of these fields are checked, you will see any content, with or without attacked media. +* Images, Videos, Audio: When selected, you will see content with the selected media type. This can be combined. If none of these fields are checked, you will see any content, with or without attached media. Additional keywords for the full text search --- @@ -61,8 +61,8 @@ Additionally to the search for content, there are keywords that can be used in t Alternatives are presented with "|". * from - Use "from:nickname" or "from:nickname@domain.tld" to search for posts from a specific author. -* to - Use "from:nickname" or "from:nickname@domain.tld" to search for posts with the given contact as receiver. -* group - Use "group:nickname" or "group:nickname@domain.tld" to search for group post of the given group. +* to - Use "to:nickname" or "to:nickname@domain.tld" to search for posts with the given contact as receiver. +* group - Use "group:nickname" or "group:nickname@domain.tld" to search for posts of the given group. * application | relay - Use "application:nickname" or "application:nickname@domain.tld" to search for posts that had been reshared by the given relay application. * server - Use "server:hostname" to search for posts from a specific server. In the case of group postings, the search text contains both the hostname of the group server and the author's hostname. * source - The ActivityPub type of the post source. Use this for example to include or exclude group posts or posts from services (aka bots). @@ -93,7 +93,7 @@ Alternatives are presented with "|". * visibility:public * visibility:unlisted * visibility:private -* language | lang - Use "language:code" to search for posts with the given language in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. +* language | lang - Use "language:code" to search for posts with the given language in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. -Remember that you can combine these kerywords. -So for example you can create a channel with all posts that talk about the Fediverse - that aren't posted in the Fediverse with the search terms: "fediverse -network:apub -network:dfrn" \ No newline at end of file +Remember that you can combine these keywords. +So for example you can create a channel with all posts that talk about the Fediverse - that aren't posted in the Fediverse with the search terms: "fediverse -network:apub -network:dfrn" diff --git a/doc/Home.md b/doc/Home.md index 33ed640746..bfd5348f36 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -1,5 +1,5 @@ -Friendica Documentation and Resources -===================================== +Help +==== **User Manual** @@ -64,18 +64,18 @@ Friendica Documentation and Resources * [Database schema documentation](help/database) * [Class Autoloading](help/autoloader) -**External Resources** +**Links** + +* Website: [https://friendi.ca](https://friendi.ca) +* Help Group: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers) +* XMPP: [support@forum.friendi.ca](xmpp:support@forum.friendi.ca?join) +* IRC: [https://web.libera.chat/?channels=#friendica](https://web.libera.chat/?channels=#friendica) +* Matrix: [https://matrix.to/#/#friendi.ca:matrix.org](https://matrix.to/#/#friendi.ca:matrix.org) +* Mailing List: [https://mailman.friendi.ca/mailman/listinfo/support-friendi.ca](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) -* [Main Website](https://friendi.ca) -* Ways to get Support - * Friendica Support Group: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers) - * [Mailing List Archive](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) you can subscribe to the list by sending an email to ``support-request(at)friendi.ca?subject=subscribe`` - * Community chat rooms (the IRC, Matrix and XMPP rooms are bridged) these public chats are logged [from IRC](https://gnusociarg.nsupdate.info/2021/%23friendica/) and [Matrix](https://view.matrix.org/alias/%23friendi.ca:matrix.org/) - * XMPP/Jabber MUC: support(at)forum.friendi.ca - * IRC: #friendica at [libera.chat](https://web.libera.chat/?channels=#friendica) - * Matrix: [#friendi.ca](https://matrix.to/#/#friendi.ca:matrix.org) or [#friendica-en](https://matrix.to/#/#friendica-en:matrix.org) at matrix.org **About** -* [Site/Version Info](friendica) -* [Friendica Credits](credits) +* [Server Information](friendica) +* [Terms of Service](tos) +* [Credits](credits) diff --git a/doc/Install.md b/doc/Install.md index c50854aaf2..d7cce941a4 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -30,7 +30,7 @@ Due to the large variety of operating systems and PHP platforms in existence we * Apache with mod-rewrite enabled and "Options All" so you can use a local `.htaccess` file * PHP 7.4+ * PHP *command line* access with register_argc_argv set to true in the php.ini file - * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar and OpenSSL extensions + * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar, IDN and OpenSSL extensions * The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it) * Some form of email server or email gateway such that PHP mail() works. If you cannot set up your own email server, you can use the [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) addon and use a remote SMTP server. diff --git a/doc/Making-Friends.md b/doc/Making-Friends.md index d928995865..d44ce2b3cb 100644 --- a/doc/Making-Friends.md +++ b/doc/Making-Friends.md @@ -107,5 +107,7 @@ They think they are a friend. You can also "block" a person. This completely blocks communications with that person. They may still be able to see your public posts, as can anybody in the world, but they cannot communicate with you directly. +Friendica will notify their server that you have blocked them, although normally that server should not notify them individually. +However, there are various simple ways they can deduce that they have been blocked if they investigate. You can also delete a friend no matter what the friendship status - which completely removes everything relating to that person from your website. diff --git a/doc/database.md b/doc/database.md index 5942b1144d..a98fca8fbd 100644 --- a/doc/database.md +++ b/doc/database.md @@ -68,6 +68,7 @@ Database Tables | [post-history](help/database/db_post-history) | Post history | | [post-link](help/database/db_post-link) | Post related external links | | [post-media](help/database/db_post-media) | Attached media | +| [post-origin](help/database/db_post-origin) | Posts from local users | | [post-question](help/database/db_post-question) | Question | | [post-question-option](help/database/db_post-question-option) | Question option | | [post-searchindex](help/database/db_post-searchindex) | Content for all posts | diff --git a/doc/database/db_gserver.md b/doc/database/db_gserver.md index 8ba9e3d9b1..0d64ef27a1 100644 --- a/doc/database/db_gserver.md +++ b/doc/database/db_gserver.md @@ -6,37 +6,41 @@ Global servers Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| --------------------- | -------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| url | | varbinary(383) | NO | | | | -| nurl | | varbinary(383) | NO | | | | -| version | | varchar(255) | NO | | | | -| site_name | | varchar(255) | NO | | | | -| info | | text | YES | | NULL | | -| register_policy | | tinyint | NO | | 0 | | -| registered-users | Number of registered users | int unsigned | NO | | 0 | | -| active-week-users | Number of active users in the last week | int unsigned | YES | | NULL | | -| active-month-users | Number of active users in the last month | int unsigned | YES | | NULL | | -| active-halfyear-users | Number of active users in the last six month | int unsigned | YES | | NULL | | -| local-posts | Number of local posts | int unsigned | YES | | NULL | | -| local-comments | Number of local comments | int unsigned | YES | | NULL | | -| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | -| poco | | varbinary(383) | NO | | | | -| noscrape | | varbinary(383) | NO | | | | -| network | | char(4) | NO | | | | -| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | -| platform | | varchar(255) | NO | | | | -| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | -| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | -| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | -| created | | datetime | NO | | 0001-01-01 00:00:00 | | -| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | -| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | -| blocked | Server is blocked | boolean | YES | | NULL | | -| failed | Connection failed | boolean | YES | | NULL | | -| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------------- | -------------------------------------------------------------- | ---------------- | ---- | --- | ------------------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| url | | varbinary(383) | NO | | | | +| nurl | | varbinary(383) | NO | | | | +| version | The version of this server software. | varchar(255) | NO | | | | +| site_name | | varchar(255) | NO | | | | +| info | | text | YES | | NULL | | +| register_policy | | tinyint | NO | | 0 | | +| registered-users | Number of registered users | int unsigned | NO | | 0 | | +| active-week-users | Number of active users in the last week | int unsigned | YES | | NULL | | +| active-month-users | Number of active users in the last month | int unsigned | YES | | NULL | | +| active-halfyear-users | Number of active users in the last six month | int unsigned | YES | | NULL | | +| local-posts | Number of local posts | int unsigned | YES | | NULL | | +| local-comments | Number of local comments | int unsigned | YES | | NULL | | +| directory-type | Type of directory service (Poco, Mastodon) | tinyint | YES | | 0 | | +| poco | | varbinary(383) | NO | | | | +| openwebauth | Path to the OpenWebAuth endpoint | varbinary(383) | YES | | NULL | | +| authredirect | Path to the authRedirect endpoint | varbinary(383) | YES | | NULL | | +| noscrape | | varbinary(383) | NO | | | | +| network | | char(4) | NO | | | | +| protocol | The protocol of the server | tinyint unsigned | YES | | NULL | | +| platform | The canonical name of this server software. | varchar(255) | NO | | | | +| repository | The url of the source code repository of this server software. | varbinary(383) | YES | | NULL | | +| homepage | The url of the homepage of this server software. | varbinary(383) | YES | | NULL | | +| relay-subscribe | Has the server subscribed to the relay system | boolean | NO | | 0 | | +| relay-scope | The scope of messages that the server wants to get | varchar(10) | NO | | | | +| detection-method | Method that had been used to detect that server | tinyint unsigned | YES | | NULL | | +| created | | datetime | NO | | 0001-01-01 00:00:00 | | +| last_poco_query | | datetime | YES | | 0001-01-01 00:00:00 | | +| last_contact | Last successful connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| last_failure | Last failed connection request | datetime | YES | | 0001-01-01 00:00:00 | | +| blocked | Server is blocked | boolean | YES | | NULL | | +| failed | Connection failed | boolean | YES | | NULL | | +| next_contact | Next connection request | datetime | YES | | 0001-01-01 00:00:00 | | Indexes ------------ diff --git a/doc/database/db_inbox-entry.md b/doc/database/db_inbox-entry.md index 834d4bfd64..e18e66f240 100644 --- a/doc/database/db_inbox-entry.md +++ b/doc/database/db_inbox-entry.md @@ -6,22 +6,24 @@ Incoming activity Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| ------------------ | -------------------------------------- | -------------- | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| activity-id | id of the incoming activity | varbinary(383) | YES | | NULL | | -| object-id | | varbinary(383) | YES | | NULL | | -| in-reply-to-id | | varbinary(383) | YES | | NULL | | -| conversation | | varbinary(383) | YES | | NULL | | -| type | Type of the activity | varchar(64) | YES | | NULL | | -| object-type | Type of the object activity | varchar(64) | YES | | NULL | | -| object-object-type | Type of the object's object activity | varchar(64) | YES | | NULL | | -| received | Receiving date | datetime | YES | | NULL | | -| activity | The JSON activity | mediumtext | YES | | NULL | | -| signer | | varchar(255) | YES | | NULL | | -| push | Is the entry pushed or have pulled it? | boolean | YES | | NULL | | -| trust | Do we trust this entry? | boolean | YES | | NULL | | -| wid | Workerqueue id | int unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------------ | -------------------------------------- | ---------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| activity-id | id of the incoming activity | varbinary(383) | YES | | NULL | | +| object-id | | varbinary(383) | YES | | NULL | | +| in-reply-to-id | | varbinary(383) | YES | | NULL | | +| context | | varbinary(383) | YES | | NULL | | +| conversation | | varbinary(383) | YES | | NULL | | +| type | Type of the activity | varchar(64) | YES | | NULL | | +| object-type | Type of the object activity | varchar(64) | YES | | NULL | | +| object-object-type | Type of the object's object activity | varchar(64) | YES | | NULL | | +| received | Receiving date | datetime | YES | | NULL | | +| activity | The JSON activity | mediumtext | YES | | NULL | | +| signer | | varchar(255) | YES | | NULL | | +| push | Is the entry pushed or have pulled it? | boolean | YES | | NULL | | +| trust | Do we trust this entry? | boolean | YES | | NULL | | +| wid | Workerqueue id | int unsigned | YES | | NULL | | +| retrial | Retrial counter | tinyint unsigned | YES | | 0 | | Indexes ------------ diff --git a/doc/database/db_post-engagement.md b/doc/database/db_post-engagement.md index 32f3ce76b6..31ae5e4e41 100644 --- a/doc/database/db_post-engagement.md +++ b/doc/database/db_post-engagement.md @@ -11,7 +11,7 @@ Fields | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | | owner-id | Item owner | int unsigned | NO | | 0 | | | contact-type | Person, organisation, news, community, relay | tinyint | NO | | 0 | | -| media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio | tinyint | NO | | 0 | | +| media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio) | tinyint | NO | | 0 | | | language | Language information about this post in the ISO 639-1 format | char(2) | YES | | NULL | | | searchtext | Simplified text for the full text search | mediumtext | YES | | NULL | | | size | Body size | int unsigned | YES | | NULL | | diff --git a/doc/database/db_post-origin.md b/doc/database/db_post-origin.md new file mode 100644 index 0000000000..dc72b0134f --- /dev/null +++ b/doc/database/db_post-origin.md @@ -0,0 +1,48 @@ +Table post-origin +=========== + +Posts from local users + +Fields +------ + +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ------------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | ----- | +| id | | int unsigned | NO | PRI | NULL | | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | + +Indexes +------------ + +| Name | Fields | +| ----------------- | ------------------- | +| PRIMARY | id | +| uid_uri-id | UNIQUE, uid, uri-id | +| uri-id | uri-id | +| parent-uri-id | parent-uri-id | +| thr-parent-id | thr-parent-id | +| vid | vid | +| parent-uri-id_uid | parent-uri-id, uid | +| uid_wall_received | uid, wall, received | + +Foreign Keys +------------ + +| Field | Target Table | Target Field | +|-------|--------------|--------------| +| uri-id | [item-uri](help/database/db_item-uri) | id | +| uid | [user](help/database/db_user) | uid | +| parent-uri-id | [item-uri](help/database/db_item-uri) | id | +| thr-parent-id | [item-uri](help/database/db_item-uri) | id | +| vid | [verb](help/database/db_verb) | id | + +Return to [database documentation](help/database) diff --git a/doc/database/db_post-searchindex.md b/doc/database/db_post-searchindex.md index c6504a7ed3..203a2dbab3 100644 --- a/doc/database/db_post-searchindex.md +++ b/doc/database/db_post-searchindex.md @@ -10,7 +10,7 @@ Fields | ---------- | --------------------------------------------------------------------- | ------------ | ---- | --- | ------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | | owner-id | Item owner | int unsigned | NO | | 0 | | -| media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio | tinyint | NO | | 0 | | +| media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio) | tinyint | NO | | 0 | | | language | Language information about this post in the ISO 639-1 format | char(2) | YES | | NULL | | | searchtext | Simplified text for the full text search | mediumtext | YES | | NULL | | | size | Body size | int unsigned | YES | | NULL | | diff --git a/doc/database/db_post-thread-user.md b/doc/database/db_post-thread-user.md index a89d94c96f..d00e852547 100644 --- a/doc/database/db_post-thread-user.md +++ b/doc/database/db_post-thread-user.md @@ -9,6 +9,7 @@ Fields | Field | Description | Type | Null | Key | Default | Extra | | --------------- | ------------------------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| context-id | Id of the item-uri table entry that contains the endpoint for the context collection | int unsigned | YES | | NULL | | | conversation-id | Id of the item-uri table entry that contains the conversation uri | int unsigned | YES | | NULL | | | owner-id | Item owner | int unsigned | NO | | 0 | | | author-id | Item author | int unsigned | NO | | 0 | | @@ -40,6 +41,7 @@ Indexes | -------------------- | --------------------- | | PRIMARY | uid, uri-id | | uri-id | uri-id | +| context-id | context-id | | conversation-id | conversation-id | | owner-id | owner-id | | author-id | author-id | @@ -68,6 +70,7 @@ Foreign Keys | Field | Target Table | Target Field | |-------|--------------|--------------| | uri-id | [item-uri](help/database/db_item-uri) | id | +| context-id | [item-uri](help/database/db_item-uri) | id | | conversation-id | [item-uri](help/database/db_item-uri) | id | | owner-id | [contact](help/database/db_contact) | id | | author-id | [contact](help/database/db_contact) | id | diff --git a/doc/database/db_post-thread.md b/doc/database/db_post-thread.md index b90fb2ab55..959927a468 100644 --- a/doc/database/db_post-thread.md +++ b/doc/database/db_post-thread.md @@ -9,6 +9,7 @@ Fields | Field | Description | Type | Null | Key | Default | Extra | | --------------- | ------------------------------------------------------------------------------------------------------- | ------------ | ---- | --- | ------------------- | ----- | | uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| context-id | Id of the item-uri table entry that contains the endpoint for the context collection | int unsigned | YES | | NULL | | | conversation-id | Id of the item-uri table entry that contains the conversation uri | int unsigned | YES | | NULL | | | owner-id | Item owner | int unsigned | NO | | 0 | | | author-id | Item author | int unsigned | NO | | 0 | | @@ -25,6 +26,7 @@ Indexes | Name | Fields | | --------------- | --------------- | | PRIMARY | uri-id | +| context-id | context-id | | conversation-id | conversation-id | | owner-id | owner-id | | author-id | author-id | @@ -38,6 +40,7 @@ Foreign Keys | Field | Target Table | Target Field | |-------|--------------|--------------| | uri-id | [item-uri](help/database/db_item-uri) | id | +| context-id | [item-uri](help/database/db_item-uri) | id | | conversation-id | [item-uri](help/database/db_item-uri) | id | | owner-id | [contact](help/database/db_contact) | id | | author-id | [contact](help/database/db_contact) | id | diff --git a/doc/database/db_post-user.md b/doc/database/db_post-user.md index 2823391d47..f702502bf2 100644 --- a/doc/database/db_post-user.md +++ b/doc/database/db_post-user.md @@ -6,38 +6,40 @@ User specific post data Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| ----------------- | --------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | | -| edited | Date of last edit (default is created) | datetime | NO | | 0001-01-01 00:00:00 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | -| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | -| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | -| contact-id | contact.id | int unsigned | NO | | 0 | | -| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | -| unseen | post has not been seen | boolean | NO | | 1 | | -| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | -| notification-type | | smallint unsigned | NO | | 0 | | -| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | -| origin | item originated at this site | boolean | NO | | 0 | | -| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ----------------- | ------------------------------------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- | +| id | | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| replies-id | Id of the item-uri table entry that contains the endpoint for the replies collection | int unsigned | YES | | NULL | | +| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | | +| edited | Date of last edit (default is created) | datetime | NO | | 0001-01-01 00:00:00 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| post-reason | Reason why the post arrived at the user | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| restrictions | Bit array of post restrictions (1 = Reply, 2 = Like, 4 = Announce) | tinyint unsigned | YES | | NULL | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| uid | Owner id which owns this copy of the item | mediumint unsigned | NO | | NULL | | +| protocol | Protocol used to deliver the item for this user | tinyint unsigned | YES | | NULL | | +| contact-id | contact.id | int unsigned | NO | | 0 | | +| event-id | Used to link to the event.id | int unsigned | YES | | NULL | | +| unseen | post has not been seen | boolean | NO | | 1 | | +| hidden | Marker to hide the post from the user | boolean | NO | | 0 | | +| notification-type | | smallint unsigned | NO | | 0 | | +| wall | This item was posted to the wall of uid | boolean | NO | | 0 | | +| origin | item originated at this site | boolean | NO | | 0 | | +| psid | ID of the permission set of this post | int unsigned | YES | | NULL | | Indexes ------------ @@ -50,6 +52,7 @@ Indexes | parent-uri-id | parent-uri-id | | thr-parent-id | thr-parent-id | | external-id | external-id | +| replies-id | replies-id | | owner-id | owner-id | | author-id | author-id | | causer-id | causer-id | @@ -76,6 +79,7 @@ Foreign Keys | parent-uri-id | [item-uri](help/database/db_item-uri) | id | | thr-parent-id | [item-uri](help/database/db_item-uri) | id | | external-id | [item-uri](help/database/db_item-uri) | id | +| replies-id | [item-uri](help/database/db_item-uri) | id | | owner-id | [contact](help/database/db_contact) | id | | author-id | [contact](help/database/db_contact) | id | | causer-id | [contact](help/database/db_contact) | id | diff --git a/doc/database/db_post.md b/doc/database/db_post.md index 303269b1c6..8f6690be06 100644 --- a/doc/database/db_post.md +++ b/doc/database/db_post.md @@ -6,26 +6,27 @@ Structure for all posts Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| ------------- | --------------------------------------------------------------------------------- | ----------------- | ---- | --- | ------------------- | ----- | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | -| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | -| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | -| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | -| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | | -| edited | Date of last edit (default is created) | datetime | NO | | 0001-01-01 00:00:00 | | -| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | -| gravity | | tinyint unsigned | NO | | 0 | | -| network | Network from where the item comes from | char(4) | NO | | | | -| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | -| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | -| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | -| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | -| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | -| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | -| global | | boolean | NO | | 0 | | -| visible | | boolean | NO | | 0 | | -| deleted | item has been marked for deletion | boolean | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------- | ------------------------------------------------------------------------------------ | ----------------- | ---- | --- | ------------------- | ----- | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | | +| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | | +| thr-parent-id | Id of the item-uri table that contains the thread parent uri | int unsigned | YES | | NULL | | +| external-id | Id of the item-uri table entry that contains the external uri | int unsigned | YES | | NULL | | +| replies-id | Id of the item-uri table entry that contains the endpoint for the replies collection | int unsigned | YES | | NULL | | +| created | Creation timestamp. | datetime | NO | | 0001-01-01 00:00:00 | | +| edited | Date of last edit (default is created) | datetime | NO | | 0001-01-01 00:00:00 | | +| received | datetime | datetime | NO | | 0001-01-01 00:00:00 | | +| gravity | | tinyint unsigned | NO | | 0 | | +| network | Network from where the item comes from | char(4) | NO | | | | +| owner-id | Link to the contact table with uid=0 of the owner of this item | int unsigned | NO | | 0 | | +| author-id | Link to the contact table with uid=0 of the author of this item | int unsigned | NO | | 0 | | +| causer-id | Link to the contact table with uid=0 of the contact that caused the item creation | int unsigned | YES | | NULL | | +| post-type | Post type (personal note, image, article, ...) | tinyint unsigned | NO | | 0 | | +| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | YES | | NULL | | +| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | NO | | 0 | | +| global | | boolean | NO | | 0 | | +| visible | | boolean | NO | | 0 | | +| deleted | item has been marked for deletion | boolean | NO | | 0 | | Indexes ------------ @@ -36,6 +37,7 @@ Indexes | parent-uri-id | parent-uri-id | | thr-parent-id | thr-parent-id | | external-id | external-id | +| replies-id | replies-id | | owner-id | owner-id | | author-id | author-id | | causer-id | causer-id | @@ -50,6 +52,7 @@ Foreign Keys | parent-uri-id | [item-uri](help/database/db_item-uri) | id | | thr-parent-id | [item-uri](help/database/db_item-uri) | id | | external-id | [item-uri](help/database/db_item-uri) | id | +| replies-id | [item-uri](help/database/db_item-uri) | id | | owner-id | [contact](help/database/db_contact) | id | | author-id | [contact](help/database/db_contact) | id | | causer-id | [contact](help/database/db_contact) | id | diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md index bfba9cb651..220454a0ee 100644 --- a/doc/database/db_user-contact.md +++ b/doc/database/db_user-contact.md @@ -6,29 +6,30 @@ User specific public contact data Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| ------------------------- | ----------------------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | -| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | -| uid | User id | mediumint unsigned | NO | PRI | 0 | | -| uri-id | Id of the item-uri table entry that contains the contact url | int unsigned | YES | | NULL | | -| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | -| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | -| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | -| hidden | This contact is hidden from the others | boolean | YES | | NULL | | -| is-blocked | User is blocked by this contact | boolean | YES | | NULL | | -| channel-frequency | Controls the frequency of the appearance of this contact in channels | tinyint unsigned | YES | | NULL | | -| pending | | boolean | YES | | NULL | | -| rel | The kind of the relation between the user and the contact | tinyint unsigned | YES | | NULL | | -| info | | mediumtext | YES | | NULL | | -| notify_new_posts | | boolean | YES | | NULL | | -| remote_self | 0 => No mirroring, 1-2 => Mirror as own post, 3 => Mirror as reshare | tinyint unsigned | YES | | NULL | | -| fetch_further_information | 0 => None, 1 => Fetch information, 3 => Fetch keywords, 2 => Fetch both | tinyint unsigned | YES | | NULL | | -| ffi_keyword_denylist | | text | YES | | NULL | | -| subhub | | boolean | YES | | NULL | | -| hub-verify | | varbinary(383) | YES | | NULL | | -| protocol | Protocol of the contact | char(4) | YES | | NULL | | -| rating | Automatically detected feed poll frequency | tinyint | YES | | NULL | | -| priority | Feed poll priority | tinyint unsigned | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| ------------------------- | -------------------------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- | +| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | | +| uid | User id | mediumint unsigned | NO | PRI | 0 | | +| uri-id | Id of the item-uri table entry that contains the contact url | int unsigned | YES | | NULL | | +| blocked | Contact is completely blocked for this user | boolean | YES | | NULL | | +| ignored | Posts from this contact are ignored | boolean | YES | | NULL | | +| collapsed | Posts from this contact are collapsed | boolean | YES | | NULL | | +| hidden | This contact is hidden from the others | boolean | YES | | NULL | | +| channel-only | This contact is displayed only in channels, but not in the network stream. | boolean | YES | | NULL | | +| is-blocked | User is blocked by this contact | boolean | YES | | NULL | | +| channel-frequency | Controls the frequency of the appearance of this contact in channels | tinyint unsigned | YES | | NULL | | +| pending | | boolean | YES | | NULL | | +| rel | The kind of the relation between the user and the contact | tinyint unsigned | YES | | NULL | | +| info | | mediumtext | YES | | NULL | | +| notify_new_posts | | boolean | YES | | NULL | | +| remote_self | 0 => No mirroring, 1-2 => Mirror as own post, 3 => Mirror as reshare | tinyint unsigned | YES | | NULL | | +| fetch_further_information | 0 => None, 1 => Fetch information, 3 => Fetch keywords, 2 => Fetch both | tinyint unsigned | YES | | NULL | | +| ffi_keyword_denylist | | text | YES | | NULL | | +| subhub | | boolean | YES | | NULL | | +| hub-verify | | varbinary(383) | YES | | NULL | | +| protocol | Protocol of the contact | char(4) | YES | | NULL | | +| rating | Automatically detected feed poll frequency | tinyint | YES | | NULL | | +| priority | Feed poll priority | tinyint unsigned | YES | | NULL | | Indexes ------------ diff --git a/doc/de/Addons.md b/doc/de/Addons.md index 0843c103ab..607f2d50dc 100644 --- a/doc/de/Addons.md +++ b/doc/de/Addons.md @@ -418,10 +418,6 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap Hook::callAll('storage_instance', $data); Hook::callAll('storage_config', $data); -### src/Module/Notifications/Ping.php - - Hook::callAll('network_ping', $arr); - ### src/Module/PermissionTooltip.php Hook::callAll('lockview_content', $item); diff --git a/doc/de/Channels.md b/doc/de/Channels.md new file mode 100644 index 0000000000..c9f9d690ac --- /dev/null +++ b/doc/de/Channels.md @@ -0,0 +1,99 @@ +Kanäle (Channels) +===== + +* [Home](help) + +Kanäle sind eine Möglichkeit neue Inhalte zu finden, oder Inhalte anzuzeigen, die du sonst möglicherweise verpasst hättest. +Es gibt mehrere vordefinierte Kanäle und zusätzlich kannst du deine eigenen, basierend auf ein paar Regeln, erstellen. +Kanäle zeigen nur Beiträge aus den letzten 24 Stunden an. (Dieser Wert kann vom Administrator geändert werden.) + +In den Anzeige-Einstellungen, im Bereich "Timelines", kannst du definieren, welche Kanäle und andere Timelines du im "Kanäle"-Widget auf der "Network"-Seite sehen möchtest und welche Kanäle in der Menüleiste oben auf der Seite erscheinen sollen. + +Ebenfalls in den Anzeige-Einstellungen, im Bereich "Kanäle", kannst du alle die Sprachen einstellen, die du in deinen Kanälen sehen möchtest. Hier kannst du mehr als eine Sprache auswählen. + +Auf der Profilseite kannst du die Kanal-Frequenz für jeden Kontakt definieren. Die Optionen sind: + +* Standardhäufigkeit: Beiträge dieses Kontakts werden im "Für Dich"-Kanal angezeigt, wenn du häufig mit diesem Kontakt interagiert hast oder wenn ein Beitrag ein gewisses Maß an Interaktion erreicht hat. +* Alle Beiträge dieses Kontakts anzeigen: Alle Beiträge dieses Kontakts werden auf dem Kanal "Für Dich" erscheinen +* Zeige nur einige Beiträge an: Wenn ein Kontakt viele Beiträge in einem kurzen Zeitraum erstellt, reduziert diese Einstellung die Anzahl der angezeigten Beiträge in jedem Kanal. +* Zeige keine Beiträge an: Beiträge von diesem Kontakt werden in keinem Kanal angezeigt. + +Voreingestellte Kanäle +--- + +* Für Dich: Beiträge von Kontakten mit denen du interagierst und die mit dir interagieren. Im Detail bestehend aus: + * Beiträge von Leuten, mit denen du überdurchschnittlich viel interagierst. + * Beiträge von Kontakten, denen du folgst und mit denen du überdurchschnittlich viel interagierst. + * Beiträge von Kontakten, bei denen du "Benachrichtigung bei neuen Beiträgen" aktiviert hast oder wo du die Kanalfrequenz entsprechend eingestellt hast. +* Entdecken: Beiträge von Kontakten denen du nicht folgst, aber denen zu folgen für dich interessant sein könnte. Im Detail bestehend aus: + * Beiträge von Leuten denen du nicht folgst, aber mit denen du überdurchschnittlich viel interagierst. + * Beiträge von Leuten denen du nicht folgst, aber die mit dir überdurchschnittlich viel interagieren. + * Beliebte Beiträge von Leuten denen du nicht folgst, aber mit denen du interagiert hast oder die mit dir interagiert haben. +* Angesagt: Beiträge mit überdurchschnittlich hoher Anzahl von Interaktionen. +* Sprache: Beiträge in deiner Sprache. +* Folgende: Beiträge von Leuten die dir folgen, aber denen du nicht folgst. +* Geteilt von teilenden: Beiträge von Kontakten denen die Leute folgen, denen du folgst. +* Ruhige teilende: Beiträge von Konten denen du folgst, aber die nicht sehr oft posten. +* Bilder: Beiträge mit Bildern. +* Audio: Beiträge mit Audio. +* Videos: Beiträge mit Videos. + +Vom Benutzer eingestellte Kanäle +--- + +In den Einstellungen, unter "Kanäle", kannst du deine eigenen Kanäle erstellen. + +Jeder Kanal wird durch diese Werte definiert: + +* Bezeichnung: Dieses Feld ist notwendig und wird für die Kanalbezeichnung verwendet. +* Beschreibung: Eine kurze Beschreibung des Inhalts. Dies kann helfen den Überblick zu behalten, wenn du viele Kanäle hast. +* Zugriffsschlüssel: Wenn du auf diesen Kanal über einen Zugriffsschlüssel zugreifen willst, kannst du ihn hier festlegen. Achte darauf, dass du nicht einen bereits verwendeten Schlüssel benutzt. +* Circle/Kanal: Dies definiert die Datenquelle für diesen Kanal. Voreingestellt ist die Globale Gemeinschaft. Es gibt ein paar vorgegebene Werte, wie die Konten denen du folgst, oder die Kontakte, die dir folgen. Außerdem können alle deine Circles ausgewählt werden. +* Tags einschließen: Durch Kommata getrennte Liste von Tags. Ein Beitrag wird verwendet, wenn er eines der aufgeführten Tags enthält. +* Tags ausschließen: Durch Kommata getrennte Liste von Tags. Wenn ein Beitrag eines dieser Tags enthält, wird er nicht Teil dieses Kanals sein. +* Volltextsuche: Dies kann genutzt werden um Inhalte, basierend auf dem Inhalt und ein paar zusätzlichen Schlüsselwörtern, ein- oder auszuschließen. Es nutzt die "boolean mode"-Operatoren von MariaDB: https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode +* Bilder, Videos, Audio: Wenn ausgewählt, wirst du Inhalte mit dem gewählten Medientyp sehen. Diese Optionen können kombiniert werden. Wenn keines dieser Felder ausgewählt wurde, wirst du alle Inhalte, mit oder ohne angefügten Medien, sehen. + +Zusätzliche Schlüsselwörter für die Volltextsuche +--- + +Zusätzlich zu der Suche nach Inhalten, gibt es Schlüsselwörter, die in der Volltextsuche genutzt werden können. +Alternativen werden durch "|" dargestellt. + +* from - Verwende "from:nickname" oder "from:nickname@domain.tld" um nach Beiträgen von einem bestimmten Autor zu suchen. +* to - Verwende "to:nickname" oder "to:nickname@domain.tld" um nach Beiträgen mit dem gegebenen Empfänger zu suchen. +* group - Verwende "group:nickname" oder "group:nickname@domain.tld" um nach Beiträgen aus der gegebenen Gruppe zu suchen. +* application | relay - Nutze "application:nickname" oder "application:nickname@domain.tld" um Beiträge zu finden, die von der gegebenen relay application geteilt wurden. +* server - Verwende "server:hostname" um Beiträge von einem bestimmten Server zu suchen. Im Falle eine Gruppen-Postings enthält der Suchtext beides, den Hostname des Gruppen-Servers und den Hostname des Autors. +* source - Der ActivityPub-Typ der Beitragsquelle. Nutze dies um beispielsweise Gruppenpostings oder Beiträge von Services (aka Bots) ein- oder auszuschließen. + * source:person - Der Beitrag wurde von einem regulären Nutzerkonto erstellt. + * source:organization - Der Beitrag wurde von einer Organisation erstellt. + * source:group - Dieser Beitrag wurde über eine Gruppe erstellt oder verteilt. + * source:service | source:news - Dieser Beitrag stammt aus einem 'service' Account. Dieser Quellen(source)-Typ wird oft genutzt um Bot Accounts zu markieren. + * source:application | source:relay - Dieser Beitrag wurde von einer Anwendung (application) erstellt. Dies wird im Fediverse höchstwahrscheinlich für die Beitragserstellung nicht genutzt. +* tag - Nutze "tag:tagname" um nach einem bestimmten tag (Schlagwort) zu suchen. +* media - Mit diesem Schlüsselwort kannst du nach angefügten Medien suchen. + * media:image | media:photo | media:picture - Dieser Beitrag enthält ein Bild + * media:video - Dieser Beitrag enthält ein Video + * media:audio - Dieser Beitrag enthält Audio + * media:card - Dieser Beitrag enthält eine Linkvorschau-'card' + * media:post - Dieser Beitrag verweist auf einen anderen Beitrag, was bedeutet, es ist ein zitierter Beitrag +* network | net - Verwende dies um Netzwerke in deinen Kanal einzuschließen oder von ihm auszuschließen. + * network:apub | network:activitypub - ActivityPub (verwendet von den Systemen im Fediverse) + * network:dfrn | network:friendica - altes Friendica-Protokoll. Heutzutage nutzt Friendica meist ActivityPub. + * network:dspr | network:diaspora - Das Diaspora-Protokoll wird hauptsächlich von Diaspora selbst genutzt. Ein paar andere Systeme unterstützen dieses Protokoll ebenfalls, wie Hubzilla, Socialhome or Ganggo. + * network:feed - RSS/Atom feeds + * network:mail - Mails die via IMAP importiert worden sind. + * network:stat | network:ostatus - Das OStatus-Protokoll wird hauptsächlich von alten GNU Social-Installationen genutzt. + * network:dscs | network:discourse - Beiträge, die über den Discourse connector empfangen werden. + * network:tmbl | network:tumblr - Beiträge, die über den Tumblr connector empfangen werden. + * network:bsky | network:bluesky - Beiträge, die über den Bluesky connector empfangen werden. +* platform - Benutze dies, um Plattformen in deinen Kanal einzuschließen, oder von ihm auszuschließen, d.h. "+platform:friendica". Im Falle eines Gruppen-Postings enthält der Suchtext beides, die Plattform des Gruppen-Servers und die Plattform des Autors. +* visibility - Du hast die Wahl zwischen verschiedenen Sichtbarkeiten. Du kannst nur die ungelisteten oder privaten Beiträge sehen, zu denen du Zugang hast. + * visibility:public - (öffentlich) + * visibility:unlisted - (ungelistet) + * visibility:private - (privat) +* language | lang - Verwende "language:code" um nach Beiträgen in der gewünschten Sprache (im [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format) zu suchen. + +Denke daran, dass du diese Schlüsselwörter kombinieren kannst. +So kannst du zum Beispiel einen Kanal erstellen, mit allen Beiträgen, die über das Fediverse sprechen, aber nicht im Fediverse veröffentlich wurden, mit diesen Suchbegriffen: "fediverse -network:apub -network:dfrn". diff --git a/doc/de/Home.md b/doc/de/Home.md index 6cd6e5ea87..d5fcb407d3 100644 --- a/doc/de/Home.md +++ b/doc/de/Home.md @@ -1,7 +1,7 @@ -Friendica - Dokumentation und Ressourcen -===================================== +Hilfe +===== -**Inhalte** +**Dokumentation für Benutzer** * Allgemeine Funktionen - Erste Schritte * [Account - Basics](help/Account-Basics) @@ -17,7 +17,7 @@ Friendica - Dokumentation und Ressourcen * [Circles und Privatsphäre](help/Circles-and-Privacy) * [Tags und Erwähnungen](help/Tags-and-Mentions) * [Community-Gruppen](help/Groups) - * [Channels](help/Channels) + * [Kanäle (Channels)](help/Channels) * [Chats](help/Chats) * Weiterführende Informationen * [Account umziehen](help/Move-Account) @@ -60,18 +60,17 @@ Friendica - Dokumentation und Ressourcen * [Translation of Friendica](help/translations) (EN) * [Run tests](help/Tests) (EN) -**Externe Ressourcen** +**Links** -* [Haupt-Webseite](https://friendi.ca) -* Support Kanäle - * Friendica Support Gruppe: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers) - * [Mailing Listen Archiv](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) zum Abonnieren der Liste eine E-Mail an ``support-request(at)friendi.ca?subject=subscribe`` senden - * Chats der Friendica Community (die IRC, Matrix und XMPP Räume sind mit einer Brücke verbunden) Logs dieser öffentlichen Chaträume können [hier aus dem IRC](https://gnusociarg.nsupdate.info/2021/%23frie) und [hier aus der Matrix](https://view.matrix.org/alias/%23friendi.ca:matrix.org/) gefunden werden. - * XMPP/Jabber MUC: support(at)forum.friendi.ca - * IRC: #friendica auf [libera.chat](https://web.libera.chat/?channels=#friendica) - * Matrix: [#friendi.ca](https://matrix.to/#/#friendi.ca:matrix.org) oder [#friendica-en](https://matrix.to/#/#friendica-en:matrix.org) auf matrix.org +* Website: [https://friendi.ca](https://friendi.ca) +* Help Group: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers) +* XMPP: [support@forum.friendi.ca](xmpp:support@forum.friendi.ca?join) +* IRC: [https://web.libera.chat/?channels=#friendica](https://web.libera.chat/?channels=#friendica) +* Matrix: [https://matrix.to/#/#friendi.ca:matrix.org](https://matrix.to/#/#friendi.ca:matrix.org) +* Mailing List: [https://mailman.friendi.ca/mailman/listinfo/support-friendi.ca](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) -**Über diese Seite** +**Über** -* [Seite/Friendica-Version](friendica) -* [Mitwirkenden bei Friendica](credits) +* [Server Information](friendica) +* [Nutzungsbedingungen](tos) +* [Mitwirkende](credits) diff --git a/doc/de/Install.md b/doc/de/Install.md index 0122988c59..46e81ba24b 100644 --- a/doc/de/Install.md +++ b/doc/de/Install.md @@ -27,7 +27,7 @@ Requirements * Apache mit einer aktiverten mod-rewrite-Funktion und dem Eintrag "Options All", so dass du die lokale .htaccess-Datei nutzen kannst * PHP 7.4+ * PHP *Kommandozeilen*-Zugang mit register_argc_argv auf "true" gesetzt in der php.ini-Datei - * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar and OpenSSL-Erweiterung + * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip, IntlChar, IDN und OpenSSL-Erweiterung * Das POSIX Modul muss aktiviert sein ([CentOS, RHEL](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) haben dies z.B. deaktiviert) * Einen E-Mail Server, so dass PHP `mail()` funktioniert. Wenn kein eigener E-Mail Server zur Verfügung steht, kann alternativ das [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) Addon mit einem externen SMTP Account verwendet werden. diff --git a/doc/tools.md b/doc/tools.md index fac1f4b392..ef916553ad 100644 --- a/doc/tools.md +++ b/doc/tools.md @@ -78,3 +78,9 @@ The following will compress */var/log/friendica* (assuming this is the location daily rotate 2 } + +### Zabbix + +To monitor the health status of your Friendica installation, you can use for example a tool like Zabbix. Please define 'stats_key' in your local.config.php in the 'system' section to be able to access the statistics page at /stats?key=your-defined-stats_key + +The statistics contain data about the worker performance, the last cron call, number of reports, inbound and outbound packets, posts and comments. diff --git a/images/bluesky.jpg b/images/bluesky.jpg index 4f551764c4..65c7593514 100644 Binary files a/images/bluesky.jpg and b/images/bluesky.jpg differ diff --git a/images/screenshots/friendica-2023-10-frio-mobile-options-dark-blue.png b/images/screenshots/friendica-2023-10-frio-mobile-options-dark-blue.png index e486cfeead..edbfe7564e 100644 Binary files a/images/screenshots/friendica-2023-10-frio-mobile-options-dark-blue.png and b/images/screenshots/friendica-2023-10-frio-mobile-options-dark-blue.png differ diff --git a/images/screenshots/friendica-2023-10-frio-mobile-options-light-blue.png b/images/screenshots/friendica-2023-10-frio-mobile-options-light-blue.png index 04c6c60682..e299313e83 100644 Binary files a/images/screenshots/friendica-2023-10-frio-mobile-options-light-blue.png and b/images/screenshots/friendica-2023-10-frio-mobile-options-light-blue.png differ diff --git a/images/screenshots/friendica-2023-10-frio-mobile-timeline-dark-blue.png b/images/screenshots/friendica-2023-10-frio-mobile-timeline-dark-blue.png index ebcbce3d6c..01ebc07076 100644 Binary files a/images/screenshots/friendica-2023-10-frio-mobile-timeline-dark-blue.png and b/images/screenshots/friendica-2023-10-frio-mobile-timeline-dark-blue.png differ diff --git a/images/screenshots/friendica-2023-12-frio-desktop.png b/images/screenshots/friendica-2023-12-frio-desktop.png index 1a926ffb65..ac11015caa 100644 Binary files a/images/screenshots/friendica-2023-12-frio-desktop.png and b/images/screenshots/friendica-2023-12-frio-desktop.png differ diff --git a/mod/item.php b/mod/item.php index 5d20cc04a6..d6bcd39029 100644 --- a/mod/item.php +++ b/mod/item.php @@ -45,7 +45,8 @@ use Friendica\Model\Post; use Friendica\Network\HTTPException; use Friendica\Util\DateTimeFormat; -function item_post(App $a) { +function item_post() +{ $uid = DI::userSession()->getLocalUserId(); if (!$uid) { @@ -233,13 +234,15 @@ function item_insert(int $uid, array $request, bool $preview, string $return_pat function item_process(array $post, array $request, bool $preview, string $return_path): array { - $post['self'] = true; - $post['api_source'] = false; - $post['attach'] = ''; - $post['title'] = trim($request['title'] ?? ''); - $post['body'] = $request['body'] ?? ''; - $post['location'] = trim($request['location'] ?? ''); - $post['coord'] = trim($request['coord'] ?? ''); + $post['self'] = true; + $post['api_source'] = false; + $post['attach'] = ''; + $post['title'] = trim($request['title'] ?? ''); + $post['content-warning'] = trim($request['summary'] ?? ''); + $post['sensitive'] = !empty($request['sensitive'] ?? false); + $post['body'] = $request['body'] ?? ''; + $post['location'] = trim($request['location'] ?? ''); + $post['coord'] = trim($request['coord'] ?? ''); $post = DI::contentItem()->addCategories($post, $request['category'] ?? ''); @@ -248,7 +251,7 @@ function item_process(array $post, array $request, bool $preview, string $return $post['body'] .= DI::contentItem()->storeAttachmentFromRequest($request); } - $post = DI::contentItem()->finalizePost($post); + $post = DI::contentItem()->finalizePost($post, $preview); if (!strlen($post['body'])) { if ($preview) { @@ -279,13 +282,14 @@ function item_process(array $post, array $request, bool $preview, string $return $post['body'] = BBCode::removeSharedData(Item::setHashtags($post['body'])); $post['writable'] = true; $post['sensitive'] = false; + $post['post-reason'] = Item::PR_LOCAL; $o = DI::conversation()->render([$post], Conversation::MODE_SEARCH, false, true); System::jsonExit(['preview' => $o]); } - Hook::callAll('post_local',$post); + Hook::callAll('post_local', $post); unset($post['edit']); unset($post['self']); diff --git a/mod/message.php b/mod/message.php index 369d3545ba..6c1aed0625 100644 --- a/mod/message.php +++ b/mod/message.php @@ -19,7 +19,6 @@ * */ -use Friendica\App; use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Content\Text\BBCode; @@ -34,7 +33,7 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; use Friendica\Util\Temporal; -function message_init(App $a) +function message_init() { $tabs = ''; @@ -61,7 +60,7 @@ function message_init(App $a) ]); } -function message_post(App $a) +function message_post() { if (!DI::userSession()->getLocalUserId()) { DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); @@ -104,7 +103,7 @@ function message_post(App $a) } } -function message_content(App $a) +function message_content() { $o = ''; Nav::setSelected('messages'); @@ -114,7 +113,7 @@ function message_content(App $a) return Login::form(); } - $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname(); + $myprofile = DI::baseUrl() . '/profile/' . DI::userSession()->getLocalUserNickname(); $tpl = Renderer::getMarkupTemplate('mail_head.tpl'); if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') { @@ -177,7 +176,7 @@ function message_content(App $a) $tpl = Renderer::getMarkupTemplate('msg-header.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ - '$nickname' => $a->getLoggedInUserNickname(), + '$nickname' => DI::userSession()->getLocalUserNickname(), '$linkurl' => DI::l10n()->t('Please enter a link URL:') ]); @@ -282,7 +281,7 @@ function message_content(App $a) $tpl = Renderer::getMarkupTemplate('msg-header.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ - '$nickname' => $a->getLoggedInUserNickname(), + '$nickname' => DI::userSession()->getLocalUserNickname(), '$linkurl' => DI::l10n()->t('Please enter a link URL:') ]); @@ -415,12 +414,10 @@ function get_messages(int $uid, int $start, int $limit): array function render_messages(array $msg, string $t): string { - $a = DI::app(); - $tpl = Renderer::getMarkupTemplate($t); $rslt = ''; - $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname(); + $myprofile = DI::baseUrl() . '/profile/' . DI::userSession()->getLocalUserNickname(); foreach ($msg as $rr) { if ($rr['unknown']) { diff --git a/mod/notes.php b/mod/notes.php index c756a5f900..92a0ff514a 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -46,7 +46,7 @@ function notes_content(App $a, bool $update = false) return; } - $o = BaseProfile::getTabsHTML('notes', true, $a->getLoggedInUserNickname(), false); + $o = BaseProfile::getTabsHTML('notes', true, DI::userSession()->getLocalUserNickname(), false); if (!$update) { $o .= '