1
1
Fork 0

Merge remote-tracking branch 'upstream/develop' into app-user2

This commit is contained in:
Michael 2021-08-09 15:32:32 +00:00
commit 4495e83eca
36 changed files with 446 additions and 312 deletions

View file

@ -1,6 +1,6 @@
-- ------------------------------------------ -- ------------------------------------------
-- Friendica 2021.09-dev (Siberian Iris) -- Friendica 2021.09-dev (Siberian Iris)
-- DB_UPDATE_VERSION 1431 -- DB_UPDATE_VERSION 1432
-- ------------------------------------------ -- ------------------------------------------
@ -126,7 +126,8 @@ CREATE TABLE IF NOT EXISTS `contact` (
`about` text COMMENT '', `about` text COMMENT '',
`keywords` text COMMENT 'public keywords (interests) of the contact', `keywords` text COMMENT 'public keywords (interests) of the contact',
`gender` varchar(32) NOT NULL DEFAULT '' COMMENT 'Deprecated', `gender` varchar(32) NOT NULL DEFAULT '' COMMENT 'Deprecated',
`xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT '', `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT 'XMPP address',
`matrix` varchar(255) NOT NULL DEFAULT '' COMMENT 'Matrix address',
`attag` varchar(255) NOT NULL DEFAULT '' COMMENT '', `attag` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '', `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`photo` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo of the contact', `photo` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo of the contact',
@ -1366,7 +1367,8 @@ CREATE TABLE IF NOT EXISTS `profile` (
`education` text COMMENT 'Deprecated', `education` text COMMENT 'Deprecated',
`contact` text COMMENT 'Deprecated', `contact` text COMMENT 'Deprecated',
`homepage` varchar(255) NOT NULL DEFAULT '' COMMENT '', `homepage` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT '', `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT 'XMPP address',
`matrix` varchar(255) NOT NULL DEFAULT '' COMMENT 'Matrix address',
`photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', `photo` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '', `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish default profile in local directory', `publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish default profile in local directory',
@ -2199,6 +2201,7 @@ CREATE VIEW `owner-view` AS SELECT
`contact`.`keywords` AS `keywords`, `contact`.`keywords` AS `keywords`,
`contact`.`gender` AS `gender`, `contact`.`gender` AS `gender`,
`contact`.`xmpp` AS `xmpp`, `contact`.`xmpp` AS `xmpp`,
`contact`.`matrix` AS `matrix`,
`contact`.`attag` AS `attag`, `contact`.`attag` AS `attag`,
`contact`.`avatar` AS `avatar`, `contact`.`avatar` AS `avatar`,
`contact`.`photo` AS `photo`, `contact`.`photo` AS `photo`,
@ -2325,6 +2328,7 @@ CREATE VIEW `account-view` AS SELECT
`contact`.`about` AS `about`, `contact`.`about` AS `about`,
`contact`.`keywords` AS `keywords`, `contact`.`keywords` AS `keywords`,
`contact`.`xmpp` AS `xmpp`, `contact`.`xmpp` AS `xmpp`,
`contact`.`matrix` AS `matrix`,
`contact`.`avatar` AS `avatar`, `contact`.`avatar` AS `avatar`,
`contact`.`photo` AS `photo`, `contact`.`photo` AS `photo`,
`contact`.`thumb` AS `thumb`, `contact`.`thumb` AS `thumb`,
@ -2408,6 +2412,7 @@ CREATE VIEW `account-user-view` AS SELECT
`contact`.`about` AS `about`, `contact`.`about` AS `about`,
`contact`.`keywords` AS `keywords`, `contact`.`keywords` AS `keywords`,
`contact`.`xmpp` AS `xmpp`, `contact`.`xmpp` AS `xmpp`,
`contact`.`matrix` AS `matrix`,
`contact`.`avatar` AS `avatar`, `contact`.`avatar` AS `avatar`,
`contact`.`photo` AS `photo`, `contact`.`photo` AS `photo`,
`contact`.`thumb` AS `thumb`, `contact`.`thumb` AS `thumb`,

View file

@ -24,7 +24,8 @@ Fields
| about | | text | YES | | NULL | | | about | | text | YES | | NULL | |
| keywords | public keywords (interests) of the contact | text | YES | | NULL | | | keywords | public keywords (interests) of the contact | text | YES | | NULL | |
| gender | Deprecated | varchar(32) | NO | | | | | gender | Deprecated | varchar(32) | NO | | | |
| xmpp | | varchar(255) | NO | | | | | xmpp | XMPP address | varchar(255) | NO | | | |
| matrix | Matrix address | varchar(255) | NO | | | |
| attag | | varchar(255) | NO | | | | | attag | | varchar(255) | NO | | | |
| avatar | | varchar(255) | NO | | | | | avatar | | varchar(255) | NO | | | |
| photo | Link to the profile photo of the contact | varchar(255) | YES | | | | | photo | Link to the profile photo of the contact | varchar(255) | YES | | | |

View file

@ -45,7 +45,8 @@ Fields
| education | Deprecated | text | YES | | NULL | | | education | Deprecated | text | YES | | NULL | |
| contact | Deprecated | text | YES | | NULL | | | contact | Deprecated | text | YES | | NULL | |
| homepage | | varchar(255) | NO | | | | | homepage | | varchar(255) | NO | | | |
| xmpp | | varchar(255) | NO | | | | | xmpp | XMPP address | varchar(255) | NO | | | |
| matrix | Matrix address | varchar(255) | NO | | | |
| photo | | varchar(255) | NO | | | | | photo | | varchar(255) | NO | | | |
| thumb | | varchar(255) | NO | | | | | thumb | | varchar(255) | NO | | | |
| publish | publish default profile in local directory | boolean | NO | | 0 | | | publish | publish default profile in local directory | boolean | NO | | 0 | |

View file

@ -680,7 +680,11 @@ function item_post(App $a) {
$o = conversation($a, [array_merge($contact_record, $datarray)], 'search', false, true); $o = conversation($a, [array_merge($contact_record, $datarray)], 'search', false, true);
System::jsonExit(['preview' => $o]); System::jsonExit(['preview' => $o]);
} elseif (!empty($_REQUEST['scheduled_at'])) { }
Hook::callAll('post_local',$datarray);
if (!empty($_REQUEST['scheduled_at'])) {
$scheduled_at = DateTimeFormat::convert($_REQUEST['scheduled_at'], 'UTC', $a->getTimezone()); $scheduled_at = DateTimeFormat::convert($_REQUEST['scheduled_at'], 'UTC', $a->getTimezone());
if ($scheduled_at > DateTimeFormat::utcNow()) { if ($scheduled_at > DateTimeFormat::utcNow()) {
unset($datarray['created']); unset($datarray['created']);
@ -691,16 +695,12 @@ function item_post(App $a) {
unset($datarray['edit']); unset($datarray['edit']);
unset($datarray['self']); unset($datarray['self']);
unset($datarray['api_source']); unset($datarray['api_source']);
Post\Delayed::add($datarray['uri'], $datarray, PRIORITY_HIGH, false, $scheduled_at); Post\Delayed::add($datarray['uri'], $datarray, PRIORITY_HIGH, Post\Delayed::PREPARED_NO_HOOK, $scheduled_at);
item_post_return(DI::baseUrl(), $api_source, $return_path); item_post_return(DI::baseUrl(), $api_source, $return_path);
} }
} }
$datarray['uri-id'] = ItemURI::getIdByURI($datarray['uri']);
Hook::callAll('post_local',$datarray);
if (!empty($datarray['cancel'])) { if (!empty($datarray['cancel'])) {
Logger::info('mod_item: post cancelled by addon.'); Logger::info('mod_item: post cancelled by addon.');
if ($return_path) { if ($return_path) {
@ -715,6 +715,8 @@ function item_post(App $a) {
System::jsonExit($json); System::jsonExit($json);
} }
$datarray['uri-id'] = ItemURI::getIdByURI($datarray['uri']);
if ($orig_post) { if ($orig_post) {
// Fill the cache field // Fill the cache field
// This could be done in Item::update as well - but we have to check for the existance of some fields. // This could be done in Item::update as well - but we have to check for the existance of some fields.

View file

@ -94,6 +94,7 @@ class VCard
'$url' => Contact::magicLinkByContact($contact, $contact['url']), '$url' => Contact::magicLinkByContact($contact, $contact['url']),
'$about' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['about'] ?? ''), '$about' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['about'] ?? ''),
'$xmpp' => DI::l10n()->t('XMPP:'), '$xmpp' => DI::l10n()->t('XMPP:'),
'$matrix' => DI::l10n()->t('Matrix:'),
'$location' => DI::l10n()->t('Location:'), '$location' => DI::l10n()->t('Location:'),
'$network_link' => $network_link, '$network_link' => $network_link,
'$network_avatar' => $network_avatar, '$network_avatar' => $network_avatar,

View file

@ -676,7 +676,7 @@ class Contact
public static function updateSelfFromUserID($uid, $update_avatar = false) public static function updateSelfFromUserID($uid, $update_avatar = false)
{ {
$fields = ['id', 'name', 'nick', 'location', 'about', 'keywords', 'avatar', 'prvkey', 'pubkey', $fields = ['id', 'name', 'nick', 'location', 'about', 'keywords', 'avatar', 'prvkey', 'pubkey',
'xmpp', 'contact-type', 'forum', 'prv', 'avatar-date', 'url', 'nurl', 'unsearchable', 'xmpp', 'matrix', 'contact-type', 'forum', 'prv', 'avatar-date', 'url', 'nurl', 'unsearchable',
'photo', 'thumb', 'micro', 'addr', 'request', 'notify', 'poll', 'confirm', 'poco', 'network']; 'photo', 'thumb', 'micro', 'addr', 'request', 'notify', 'poll', 'confirm', 'poco', 'network'];
$self = DBA::selectFirst('contact', $fields, ['uid' => $uid, 'self' => true]); $self = DBA::selectFirst('contact', $fields, ['uid' => $uid, 'self' => true]);
if (!DBA::isResult($self)) { if (!DBA::isResult($self)) {
@ -690,7 +690,7 @@ class Contact
} }
$fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region', $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
'country-name', 'pub_keywords', 'xmpp', 'net-publish']; 'country-name', 'pub_keywords', 'xmpp', 'matrix', 'net-publish'];
$profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]); $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
if (!DBA::isResult($profile)) { if (!DBA::isResult($profile)) {
return false; return false;
@ -702,7 +702,7 @@ class Contact
'avatar-date' => $self['avatar-date'], 'location' => Profile::formatLocation($profile), 'avatar-date' => $self['avatar-date'], 'location' => Profile::formatLocation($profile),
'about' => $profile['about'], 'keywords' => $profile['pub_keywords'], 'about' => $profile['about'], 'keywords' => $profile['pub_keywords'],
'contact-type' => $user['account-type'], 'prvkey' => $user['prvkey'], 'contact-type' => $user['account-type'], 'prvkey' => $user['prvkey'],
'pubkey' => $user['pubkey'], 'xmpp' => $profile['xmpp'], 'network' => Protocol::DFRN]; 'pubkey' => $user['pubkey'], 'xmpp' => $profile['xmpp'], 'matrix' => $profile['matrix'], 'network' => Protocol::DFRN];
// it seems as if ported accounts can have wrong values, so we make sure that now everything is fine. // it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
$fields['url'] = DI::baseUrl() . '/profile/' . $user['nickname']; $fields['url'] = DI::baseUrl() . '/profile/' . $user['nickname'];
@ -2064,11 +2064,11 @@ class Contact
*/ */
// These fields aren't updated by this routine: // These fields aren't updated by this routine:
// 'xmpp', 'sensitive' // 'sensitive'
$fields = ['uid', 'uri-id', 'avatar', 'header', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe', $fields = ['uid', 'uri-id', 'avatar', 'header', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe',
'manually-approve', 'unsearchable', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco', 'manually-approve', 'unsearchable', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco',
'network', 'alias', 'baseurl', 'gsid', 'forum', 'prv', 'contact-type', 'pubkey', 'last-item']; 'network', 'alias', 'baseurl', 'gsid', 'forum', 'prv', 'contact-type', 'pubkey', 'last-item', 'xmpp', 'matrix'];
$contact = DBA::selectFirst('contact', $fields, ['id' => $id]); $contact = DBA::selectFirst('contact', $fields, ['id' => $id]);
if (!DBA::isResult($contact)) { if (!DBA::isResult($contact)) {
return false; return false;

View file

@ -706,7 +706,7 @@ class Item
return GRAVITY_UNKNOWN; // Should not happen return GRAVITY_UNKNOWN; // Should not happen
} }
public static function insert($item, $notify = false, $dontcache = false) public static function insert(array $item, bool $notify = false, bool $post_local = true)
{ {
$orig_item = $item; $orig_item = $item;
@ -931,7 +931,7 @@ class Item
$item["private"] = self::PRIVATE; $item["private"] = self::PRIVATE;
} }
if ($notify) { if ($notify && $post_local) {
$item['edit'] = false; $item['edit'] = false;
$item['parent'] = $parent_id; $item['parent'] = $parent_id;
@ -953,7 +953,7 @@ class Item
unset($_SESSION['authenticated']); unset($_SESSION['authenticated']);
unset($_SESSION['uid']); unset($_SESSION['uid']);
} }
} else { } elseif (!$notify) {
Hook::callAll('post_remote', $item); Hook::callAll('post_remote', $item);
} }
@ -1141,15 +1141,13 @@ class Item
return 0; return 0;
} }
if (!$dontcache) { if ($notify) {
if ($notify) { if (!\Friendica\Content\Feature::isEnabled($posted_item['uid'], 'explicit_mentions') && ($posted_item['gravity'] == GRAVITY_COMMENT)) {
if (!\Friendica\Content\Feature::isEnabled($posted_item['uid'], 'explicit_mentions') && ($posted_item['gravity'] == GRAVITY_COMMENT)) { Tag::createImplicitMentions($posted_item['uri-id'], $posted_item['thr-parent-id']);
Tag::createImplicitMentions($posted_item['uri-id'], $posted_item['thr-parent-id']);
}
Hook::callAll('post_local_end', $posted_item);
} else {
Hook::callAll('post_remote_end', $posted_item);
} }
Hook::callAll('post_local_end', $posted_item);
} else {
Hook::callAll('post_remote_end', $posted_item);
} }
if ($posted_item['gravity'] === GRAVITY_PARENT) { if ($posted_item['gravity'] === GRAVITY_PARENT) {
@ -1465,7 +1463,7 @@ class Item
} }
} }
$distributed = self::insert($item, $notify, true); $distributed = self::insert($item, $notify);
if (!$distributed) { if (!$distributed) {
Logger::info("Distributed item wasn't stored", ['uri-id' => $item['uri-id'], 'user' => $uid]); Logger::info("Distributed item wasn't stored", ['uri-id' => $item['uri-id'], 'user' => $uid]);
@ -1534,7 +1532,7 @@ class Item
$item['contact-id'] = $item['author-id']; $item['contact-id'] = $item['author-id'];
} }
$public_shadow = self::insert($item, false, true); $public_shadow = self::insert($item);
Logger::info('Stored public shadow', ['thread' => $itemid, 'id' => $public_shadow]); Logger::info('Stored public shadow', ['thread' => $itemid, 'id' => $public_shadow]);
} }
@ -1593,7 +1591,7 @@ class Item
unset($item['post-reason']); unset($item['post-reason']);
$item['contact-id'] = Contact::getIdForURL($item['author-link']); $item['contact-id'] = Contact::getIdForURL($item['author-link']);
$public_shadow = self::insert($item, false, true); $public_shadow = self::insert($item);
Logger::info('Stored public shadow', ['uri-id' => $item['uri-id'], 'id' => $public_shadow]); Logger::info('Stored public shadow', ['uri-id' => $item['uri-id'], 'id' => $public_shadow]);

View file

@ -33,19 +33,36 @@ use Friendica\Util\DateTimeFormat;
class Delayed class Delayed
{ {
/**
* The content of the post is posted as is. Connector settings are using the default settings.
* This is used for automated scheduled posts via feeds or from the API.
*/
const PREPARED = 0;
/**
* The content is posted like a manual post. Means some processing of body will be done.
* Also it is posted with default permissions and default connector settings.
* This is used for mirrored connector posts.
*/
const UNPREPARED = 1;
/**
* Like PREPARED, but additionally the connector settings can differ.
* This is used when manually publishing scheduled posts.
*/
const PREPARED_NO_HOOK = 2;
/** /**
* Insert a new delayed post * Insert a new delayed post
* *
* @param string $uri * @param string $uri
* @param array $item * @param array $item
* @param integer $notify * @param int $notify
* @param bool $unprepared * @param int $preparation_mode
* @param string $delayed * @param string $delayed
* @param array $taglist * @param array $taglist
* @param array $attachments * @param array $attachments
* @return int ID of the created delayed post entry * @return int ID of the created delayed post entry
*/ */
public static function add(string $uri, array $item, int $notify = 0, bool $unprepared = false, string $delayed = '', array $taglist = [], array $attachments = []) public static function add(string $uri, array $item, int $notify = 0, int $preparation_mode = self::PREPARED, string $delayed = '', array $taglist = [], array $attachments = [])
{ {
if (empty($item['uid']) || self::exists($uri, $item['uid'])) { if (empty($item['uid']) || self::exists($uri, $item['uid'])) {
Logger::notice('No uid or already found'); Logger::notice('No uid or already found');
@ -63,7 +80,7 @@ class Delayed
Logger::notice('Adding post for delayed publishing', ['uid' => $item['uid'], 'delayed' => $delayed, 'uri' => $uri]); Logger::notice('Adding post for delayed publishing', ['uid' => $item['uid'], 'delayed' => $delayed, 'uri' => $uri]);
$wid = Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $delayed], 'DelayedPublish', $item, $notify, $taglist, $attachments, $unprepared, $uri); $wid = Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $delayed], 'DelayedPublish', $item, $notify, $taglist, $attachments, $preparation_mode, $uri);
if (!$wid) { if (!$wid) {
return 0; return 0;
} }
@ -168,21 +185,21 @@ class Delayed
/** /**
* Publish a delayed post * Publish a delayed post
* *
* @param array $item * @param array $item
* @param integer $notify * @param int $notify
* @param array $taglist * @param array $taglist
* @param array $attachments * @param array $attachments
* @param bool $unprepared * @param int $preparation_mode
* @param string $uri * @param string $uri
* @return bool * @return bool
*/ */
public static function publish(array $item, int $notify = 0, array $taglist = [], array $attachments = [], bool $unprepared = false, string $uri = '') public static function publish(array $item, int $notify = 0, array $taglist = [], array $attachments = [], int $preparation_mode = self::PREPARED, string $uri = '')
{ {
if (!empty($attachments)) { if (!empty($attachments)) {
$item['attachments'] = $attachments; $item['attachments'] = $attachments;
} }
if ($unprepared) { if ($preparation_mode == self::UNPREPARED) {
$_SESSION['authenticated'] = true; $_SESSION['authenticated'] = true;
$_SESSION['uid'] = $item['uid']; $_SESSION['uid'] = $item['uid'];
@ -209,7 +226,8 @@ class Delayed
return $id; return $id;
} }
$id = Item::insert($item, $notify);
$id = Item::insert($item, $notify, $preparation_mode == self::PREPARED);
Logger::notice('Post stored', ['id' => $id, 'uid' => $item['uid'], 'cid' => $item['contact-id']]); Logger::notice('Post stored', ['id' => $id, 'uid' => $item['uid'], 'cid' => $item['contact-id']]);

View file

@ -361,6 +361,7 @@ class Profile
$homepage = !empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false; $homepage = !empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false;
$about = !empty($profile['about']) ? DI::l10n()->t('About:') : false; $about = !empty($profile['about']) ? DI::l10n()->t('About:') : false;
$xmpp = !empty($profile['xmpp']) ? DI::l10n()->t('XMPP:') : false; $xmpp = !empty($profile['xmpp']) ? DI::l10n()->t('XMPP:') : false;
$matrix = !empty($profile['matrix']) ? DI::l10n()->t('Matrix:') : false;
if ((!empty($profile['hidewall']) || $block) && !Session::isAuthenticated()) { if ((!empty($profile['hidewall']) || $block) && !Session::isAuthenticated()) {
$location = $homepage = $about = false; $location = $homepage = $about = false;
@ -439,6 +440,7 @@ class Profile
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$profile' => $p, '$profile' => $p,
'$xmpp' => $xmpp, '$xmpp' => $xmpp,
'$matrix' => $matrix,
'$follow' => DI::l10n()->t('Follow'), '$follow' => DI::l10n()->t('Follow'),
'$follow_link' => $follow_link, '$follow_link' => $follow_link,
'$unfollow' => DI::l10n()->t('Unfollow'), '$unfollow' => DI::l10n()->t('Unfollow'),

View file

@ -186,7 +186,7 @@ class Statuses extends BaseApi
if (!empty($request['scheduled_at'])) { if (!empty($request['scheduled_at'])) {
$item['guid'] = Item::guid($item, true); $item['guid'] = Item::guid($item, true);
$item['uri'] = Item::newURI($item['uid'], $item['guid']); $item['uri'] = Item::newURI($item['uid'], $item['guid']);
$id = Post\Delayed::add($item['uri'], $item, PRIORITY_HIGH, false, $request['scheduled_at']); $id = Post\Delayed::add($item['uri'], $item, PRIORITY_HIGH, Post\Delayed::PREPARED, $request['scheduled_at']);
if (empty($id)) { if (empty($id)) {
DI::mstdnError()->InternalError(); DI::mstdnError()->InternalError();
} }

View file

@ -607,6 +607,8 @@ class Contact extends BaseModule
'$location_label' => DI::l10n()->t('Location:'), '$location_label' => DI::l10n()->t('Location:'),
'$xmpp' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['xmpp']), '$xmpp' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['xmpp']),
'$xmpp_label' => DI::l10n()->t('XMPP:'), '$xmpp_label' => DI::l10n()->t('XMPP:'),
'$matrix' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['matrix']),
'$matrix_label' => DI::l10n()->t('Matrix:'),
'$about' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['about'], BBCode::EXTERNAL), '$about' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['about'], BBCode::EXTERNAL),
'$about_label' => DI::l10n()->t('About:'), '$about_label' => DI::l10n()->t('About:'),
'$keywords' => $contact['keywords'], '$keywords' => $contact['keywords'],

View file

@ -120,7 +120,7 @@ class NoScrape extends BaseModule
$json_info['last-activity'] = date('o-W', $last_active); $json_info['last-activity'] = date('o-W', $last_active);
//These are optional fields. //These are optional fields.
$profile_fields = ['about', 'locality', 'region', 'postal-code', 'country-name']; $profile_fields = ['about', 'locality', 'region', 'postal-code', 'country-name', 'xmpp', 'matrix'];
foreach ($profile_fields as $field) { foreach ($profile_fields as $field) {
if (!empty($profile[$field])) { if (!empty($profile[$field])) {
$json_info["$field"] = $profile[$field]; $json_info["$field"] = $profile[$field];

View file

@ -176,6 +176,10 @@ class Profile extends BaseProfile
$basic_fields += self::buildField('xmpp', DI::l10n()->t('XMPP:'), $profile['xmpp']); $basic_fields += self::buildField('xmpp', DI::l10n()->t('XMPP:'), $profile['xmpp']);
} }
if ($profile['matrix']) {
$basic_fields += self::buildField('matrix', DI::l10n()->t('Matrix:'), $profile['matrix']);
}
if ($profile['homepage']) { if ($profile['homepage']) {
$basic_fields += self::buildField('homepage', DI::l10n()->t('Homepage:'), HTML::toLink($profile['homepage'])); $basic_fields += self::buildField('homepage', DI::l10n()->t('Homepage:'), HTML::toLink($profile['homepage']));
} }

View file

@ -92,6 +92,7 @@ class Index extends BaseSettings
$pub_keywords = self::cleanKeywords(Strings::escapeTags(trim($_POST['pub_keywords']))); $pub_keywords = self::cleanKeywords(Strings::escapeTags(trim($_POST['pub_keywords'])));
$prv_keywords = self::cleanKeywords(Strings::escapeTags(trim($_POST['prv_keywords']))); $prv_keywords = self::cleanKeywords(Strings::escapeTags(trim($_POST['prv_keywords'])));
$xmpp = Strings::escapeTags(trim($_POST['xmpp'])); $xmpp = Strings::escapeTags(trim($_POST['xmpp']));
$matrix = Strings::escapeTags(trim($_POST['matrix']));
$homepage = Strings::escapeTags(trim($_POST['homepage'])); $homepage = Strings::escapeTags(trim($_POST['homepage']));
if ((strpos($homepage, 'http') !== 0) && (strlen($homepage))) { if ((strpos($homepage, 'http') !== 0) && (strlen($homepage))) {
// neither http nor https in URL, add them // neither http nor https in URL, add them
@ -120,6 +121,7 @@ class Index extends BaseSettings
'postal-code' => $postal_code, 'postal-code' => $postal_code,
'country-name' => $country_name, 'country-name' => $country_name,
'xmpp' => $xmpp, 'xmpp' => $xmpp,
'matrix' => $matrix,
'homepage' => $homepage, 'homepage' => $homepage,
'pub_keywords' => $pub_keywords, 'pub_keywords' => $pub_keywords,
'prv_keywords' => $prv_keywords, 'prv_keywords' => $prv_keywords,
@ -240,6 +242,7 @@ class Index extends BaseSettings
'$country_name' => ['country_name', DI::l10n()->t('Country:'), $profile['country-name']], '$country_name' => ['country_name', DI::l10n()->t('Country:'), $profile['country-name']],
'$age' => ((intval($profile['dob'])) ? '(' . DI::l10n()->t('Age: ') . DI::l10n()->tt('%d year old', '%d years old', Temporal::getAgeByTimezone($profile['dob'], $profile['timezone'])) . ')' : ''), '$age' => ((intval($profile['dob'])) ? '(' . DI::l10n()->t('Age: ') . DI::l10n()->tt('%d year old', '%d years old', Temporal::getAgeByTimezone($profile['dob'], $profile['timezone'])) . ')' : ''),
'$xmpp' => ['xmpp', DI::l10n()->t('XMPP (Jabber) address:'), $profile['xmpp'], DI::l10n()->t('The XMPP address will be propagated to your contacts so that they can follow you.')], '$xmpp' => ['xmpp', DI::l10n()->t('XMPP (Jabber) address:'), $profile['xmpp'], DI::l10n()->t('The XMPP address will be propagated to your contacts so that they can follow you.')],
'$matrix' => ['matrix', DI::l10n()->t('Matrix (Element) address:'), $profile['matrix'], DI::l10n()->t('The Matrix address will be published so that people can follow you there.')],
'$homepage' => ['homepage', DI::l10n()->t('Homepage URL:'), $profile['homepage']], '$homepage' => ['homepage', DI::l10n()->t('Homepage URL:'), $profile['homepage']],
'$pub_keywords' => ['pub_keywords', DI::l10n()->t('Public Keywords:'), $profile['pub_keywords'], DI::l10n()->t('(Used for suggesting potential friends, can be seen by others)')], '$pub_keywords' => ['pub_keywords', DI::l10n()->t('Public Keywords:'), $profile['pub_keywords'], DI::l10n()->t('(Used for suggesting potential friends, can be seen by others)')],
'$prv_keywords' => ['prv_keywords', DI::l10n()->t('Private Keywords:'), $profile['prv_keywords'], DI::l10n()->t('(Used for searching profiles, never shown to others)')], '$prv_keywords' => ['prv_keywords', DI::l10n()->t('Private Keywords:'), $profile['prv_keywords'], DI::l10n()->t('(Used for searching profiles, never shown to others)')],

View file

@ -47,7 +47,7 @@ class Xrd extends BaseModule
} }
$uri = urldecode(Strings::escapeTags(trim($_GET['uri']))); $uri = urldecode(Strings::escapeTags(trim($_GET['uri'])));
if (($_SERVER['HTTP_ACCEPT'] ?? '') == 'application/jrd+json') { if (strpos($_SERVER['HTTP_ACCEPT'] ?? '', 'application/jrd+json') !== false) {
$mode = 'json'; $mode = 'json';
} else { } else {
$mode = 'xml'; $mode = 'xml';
@ -58,7 +58,7 @@ class Xrd extends BaseModule
} }
$uri = urldecode(Strings::escapeTags(trim($_GET['resource']))); $uri = urldecode(Strings::escapeTags(trim($_GET['resource'])));
if (($_SERVER['HTTP_ACCEPT'] ?? '') == 'application/xrd+xml') { if (strpos($_SERVER['HTTP_ACCEPT'] ?? '', 'application/xrd+xml') !== false) {
$mode = 'xml'; $mode = 'xml';
} else { } else {
$mode = 'json'; $mode = 'json';
@ -159,9 +159,6 @@ class Xrd extends BaseModule
{ {
$salmon_key = Salmon::salmonKey($owner['spubkey']); $salmon_key = Salmon::salmonKey($owner['spubkey']);
header('Access-Control-Allow-Origin: *');
header('Content-type: application/json; charset=utf-8');
$json = [ $json = [
'subject' => 'acct:' . $owner['addr'], 'subject' => 'acct:' . $owner['addr'],
'aliases' => [ 'aliases' => [
@ -235,8 +232,8 @@ class Xrd extends BaseModule
], ],
]; ];
echo json_encode($json); header('Access-Control-Allow-Origin: *');
exit(); System::jsonExit($json, 'application/jrd+json; charset=utf-8');
} }
private static function printXML($alias, $baseURL, $user, $owner, $avatar) private static function printXML($alias, $baseURL, $user, $owner, $avatar)

View file

@ -89,8 +89,8 @@ class Probe
private static function rearrangeData($data) private static function rearrangeData($data)
{ {
$fields = ["name", "nick", "guid", "url", "addr", "alias", "photo", "header", $fields = ["name", "nick", "guid", "url", "addr", "alias", "photo", "header",
"account-type", "community", "keywords", "location", "about", "hide", "account-type", "community", "keywords", "location", "about", "xmpp", "matrix",
"batch", "notify", "poll", "request", "confirm", "subscribe", "poco", "hide", "batch", "notify", "poll", "request", "confirm", "subscribe", "poco",
"following", "followers", "inbox", "outbox", "sharedinbox", "following", "followers", "inbox", "outbox", "sharedinbox",
"priority", "network", "pubkey", "manually-approve", "baseurl", "gsid"]; "priority", "network", "pubkey", "manually-approve", "baseurl", "gsid"];
@ -1067,6 +1067,14 @@ class Probe
$data["about"] = $json["about"]; $data["about"] = $json["about"];
} }
if (!empty($json["xmpp"])) {
$data["xmpp"] = $json["xmpp"];
}
if (!empty($json["matrix"])) {
$data["matrix"] = $json["matrix"];
}
if (!empty($json["key"])) { if (!empty($json["key"])) {
$data["pubkey"] = $json["key"]; $data["pubkey"] = $json["key"];
} }
@ -2230,6 +2238,7 @@ class Probe
'header' => $profile['header'] ? Contact::getHeaderUrlForId($profile['id'], $profile['updated']) : '', 'header' => $profile['header'] ? Contact::getHeaderUrlForId($profile['id'], $profile['updated']) : '',
'account-type' => $profile['contact-type'], 'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY), 'account-type' => $profile['contact-type'], 'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY),
'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'], 'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'],
'xmpp' => $profile['xmpp'], 'matrix' => $profile['matrix'],
'hide' => !$profile['net-publish'], 'batch' => '', 'notify' => $profile['notify'], 'hide' => !$profile['net-publish'], 'batch' => '', 'notify' => $profile['notify'],
'poll' => $profile['poll'], 'request' => $profile['request'], 'confirm' => $profile['confirm'], 'poll' => $profile['poll'], 'request' => $profile['request'], 'confirm' => $profile['confirm'],
'subscribe' => $approfile['generator']['url'] . '/follow?url={uri}', 'poco' => $profile['poco'], 'subscribe' => $approfile['generator']['url'] . '/follow?url={uri}', 'poco' => $profile['poco'],

View file

@ -354,7 +354,7 @@ class Transmitter
$data['url'] = $owner['url']; $data['url'] = $owner['url'];
$data['manuallyApprovesFollowers'] = in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]); $data['manuallyApprovesFollowers'] = in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]);
$data['discoverable'] = $owner['net-publish']; $data['discoverable'] = (bool)$owner['net-publish'];
$data['publicKey'] = ['id' => $owner['url'] . '#main-key', $data['publicKey'] = ['id' => $owner['url'] . '#main-key',
'owner' => $owner['url'], 'owner' => $owner['url'],
'publicKeyPem' => $owner['pubkey']]; 'publicKeyPem' => $owner['pubkey']];

View file

@ -601,7 +601,7 @@ class Feed
} }
$publish_at = date(DateTimeFormat::MYSQL, $publish_time); $publish_at = date(DateTimeFormat::MYSQL, $publish_time);
if (Post\Delayed::add($posting['item']['uri'], $posting['item'], $posting['notify'], false, $publish_at, $posting['taglist'], $posting['attachments'])) { if (Post\Delayed::add($posting['item']['uri'], $posting['item'], $posting['notify'], Post\Delayed::PREPARED, $publish_at, $posting['taglist'], $posting['attachments'])) {
DI::pConfig()->set($item['uid'], 'system', 'last_publish', $publish_time); DI::pConfig()->set($item['uid'], 'system', 'last_publish', $publish_time);
} }
} }

View file

@ -29,17 +29,17 @@ class DelayedPublish
/** /**
* Publish a post, used for delayed postings * Publish a post, used for delayed postings
* *
* @param array $item * @param array $item
* @param integer $notify * @param int $notify
* @param array $taglist * @param array $taglist
* @param array $attachments * @param array $attachments
* @param bool $unprepared * @param int $preparation_mode
* @param string $uri * @param string $uri
* @return void * @return void
*/ */
public static function execute(array $item, int $notify = 0, array $taglist = [], array $attachments = [], bool $unprepared = false, string $uri = '') public static function execute(array $item, int $notify = 0, array $taglist = [], array $attachments = [], int $preparation_mode = Post\Delayed::PREPARED, string $uri = '')
{ {
$id = Post\Delayed::publish($item, $notify, $taglist, $attachments, $unprepared, $uri); $id = Post\Delayed::publish($item, $notify, $taglist, $attachments, $preparation_mode, $uri);
Logger::notice('Post published', ['id' => $id, 'uid' => $item['uid'], 'notify' => $notify, 'unprepared' => $unprepared]); Logger::notice('Post published', ['id' => $id, 'uid' => $item['uid'], 'notify' => $notify, 'unprepared' => $preparation_mode]);
} }
} }

View file

@ -55,7 +55,7 @@
use Friendica\Database\DBA; use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) { if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1431); define('DB_UPDATE_VERSION', 1432);
} }
return [ return [
@ -184,7 +184,8 @@ return [
"about" => ["type" => "text", "comment" => ""], "about" => ["type" => "text", "comment" => ""],
"keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"], "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
"gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"], "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Deprecated"],
"xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
"matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
"attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"], "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
@ -1384,7 +1385,8 @@ return [
"education" => ["type" => "text", "comment" => "Deprecated"], "education" => ["type" => "text", "comment" => "Deprecated"],
"contact" => ["type" => "text", "comment" => "Deprecated"], "contact" => ["type" => "text", "comment" => "Deprecated"],
"homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
"matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
"photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"], "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],

View file

@ -713,6 +713,7 @@
"keywords" => ["contact", "keywords"], "keywords" => ["contact", "keywords"],
"gender" => ["contact", "gender"], "gender" => ["contact", "gender"],
"xmpp" => ["contact", "xmpp"], "xmpp" => ["contact", "xmpp"],
"matrix" => ["contact", "matrix"],
"attag" => ["contact", "attag"], "attag" => ["contact", "attag"],
"avatar" => ["contact", "avatar"], "avatar" => ["contact", "avatar"],
"photo" => ["contact", "photo"], "photo" => ["contact", "photo"],
@ -837,6 +838,7 @@
"about" => ["contact", "about"], "about" => ["contact", "about"],
"keywords" => ["contact", "keywords"], "keywords" => ["contact", "keywords"],
"xmpp" => ["contact", "xmpp"], "xmpp" => ["contact", "xmpp"],
"matrix" => ["contact", "matrix"],
"avatar" => ["contact", "avatar"], "avatar" => ["contact", "avatar"],
"photo" => ["contact", "photo"], "photo" => ["contact", "photo"],
"thumb" => ["contact", "thumb"], "thumb" => ["contact", "thumb"],
@ -918,6 +920,7 @@
"about" => ["contact", "about"], "about" => ["contact", "about"],
"keywords" => ["contact", "keywords"], "keywords" => ["contact", "keywords"],
"xmpp" => ["contact", "xmpp"], "xmpp" => ["contact", "xmpp"],
"matrix" => ["contact", "matrix"],
"avatar" => ["contact", "avatar"], "avatar" => ["contact", "avatar"],
"photo" => ["contact", "photo"], "photo" => ["contact", "photo"],
"thumb" => ["contact", "thumb"], "thumb" => ["contact", "thumb"],

File diff suppressed because it is too large Load diff

View file

@ -51,6 +51,7 @@
<dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl> <dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location nofilter}}</dd></dl>{{/if}} {{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location nofilter}}</dd></dl>{{/if}}
{{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}} {{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
{{if $matrix}}<dl><dt>{{$matrix_label}}</dt><dd>{{$matrix}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}} {{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}} {{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}}
</div>{{* End of contact-edit-links *}} </div>{{* End of contact-edit-links *}}

View file

@ -77,6 +77,14 @@
</dl> </dl>
{{/if}} {{/if}}
{{if $basic_fields.matrix}}
<dl id="aprofile-matrix" class="row {{$basic_fields.matrix.class|default:'aprofile'}}">
<hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.matrix.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.matrix.value nofilter}}</dd>
</dl>
{{/if}}
{{if $basic_fields.pub_keywords}} {{if $basic_fields.pub_keywords}}
<dl id="aprofile-tags" class="row {{$basic_fields.pub_keywords.class|default:'aprofile'}}"> <dl id="aprofile-tags" class="row {{$basic_fields.pub_keywords.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">

View file

@ -29,6 +29,13 @@
</dl> </dl>
{{/if}} {{/if}}
{{if $profile.matrix}}
<dl class="matrix">
<dt class="matrix-label">{{$matrix}}</dt>
<dd class="matrix-data">{{$profile.matrix}}</dd>
</dl>
{{/if}}
{{if $profile.upubkey}}<div class="key u-key" style="display:none;">{{$profile.upubkey}}</div>{{/if}} {{if $profile.upubkey}}<div class="key u-key" style="display:none;">{{$profile.upubkey}}</div>{{/if}}
{{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}} {{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}}

View file

@ -80,6 +80,12 @@
</div> </div>
<div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div> <div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div> <div id="profile-edit-xmpp-end"></div>
<div id="profile-edit-matrix-wrapper">
<label id="profile-edit-matrix-label" for="profile-edit-matrix">{{$matrix.1}} </label>
<input type="text" size="32" name="matrix" id="profile-edit-matrix" title="{{$lbl_ex2}}" value="{{$matrix.2}}"/>
</div>
<div id="profile-edit-matrix-desc">{{$matrix.3}}</div>
<div id="profile-edit-matrix-end"></div>
<div id="profile-edit-pubkeywords-wrapper"> <div id="profile-edit-pubkeywords-wrapper">
<label id="profile-edit-pubkeywords-label" for="profile-edit-pubkeywords">{{$pub_keywords.1}} </label> <label id="profile-edit-pubkeywords-label" for="profile-edit-pubkeywords">{{$pub_keywords.1}} </label>
<input type="text" size="32" name="pub_keywords" id="profile-edit-pubkeywords" title="{{$lbl_ex2}}" value="{{$pub_keywords.2}}"/> <input type="text" size="32" name="pub_keywords" id="profile-edit-pubkeywords" title="{{$lbl_ex2}}" value="{{$pub_keywords.2}}"/>

View file

@ -14,6 +14,12 @@
<dd class="xmpp-data">{{$contact.xmpp}}</dd> <dd class="xmpp-data">{{$contact.xmpp}}</dd>
</dl> </dl>
{{/if}} {{/if}}
{{if $contact.matrix}}
<dl class="matrix">
<dt class="matrix-label">{{$matrix}}</dt>
<dd class="matrix-data">{{$contact.matrix}}</dd>
</dl>
{{/if}}
{{if $contact.location}} {{if $contact.location}}
<dl class="location" dir="auto"> <dl class="location" dir="auto">
<dt class="location-label">{{$location}}</dt> <dt class="location-label">{{$location}}</dt>

View file

@ -1167,7 +1167,7 @@ aside .vcard .detail {
display: table; display: table;
padding: 2px 0; padding: 2px 0;
} }
aside .xmpp { aside .xmpp, aside .matrix {
display: table; display: table;
} }
aside .vcard .icon { aside .vcard .icon {

View file

@ -96,6 +96,14 @@
</div> </div>
{{/if}} {{/if}}
{{if $matrix}}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<hr class="profile-separator">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-muted">{{$matrix_label}}</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">{{$matrix}}</div>
</div>
{{/if}}
{{if $keywords}} {{if $keywords}}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<hr class="profile-separator"> <hr class="profile-separator">

View file

@ -88,11 +88,18 @@
{{if $profile.xmpp}} {{if $profile.xmpp}}
<div class="xmpp"> <div class="xmpp">
<span class="xmpp-label icon"><i class="fa fa-comments"></i></span> <span class="xmpp-label icon"><i class="fa fa-xmpp"></i></span>
<span class="xmpp-data"><a href="xmpp:{{$profile.xmpp}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$profile.xmpp}}</a></span> <span class="xmpp-data"><a href="xmpp:{{$profile.xmpp}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$profile.xmpp}}</a></span>
</div> </div>
{{/if}} {{/if}}
{{if $profile.matrix}}
<div class="matrix">
<span class="matrix-label icon"><i class="fa fa-matrix-org"></i></span>
<span class="matrix-data"><a href="matrix:{{$profile.matrix}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$profile.matrix}}</a></span>
</div>
{{/if}}
{{if $profile.upubkey}}<div class="key u-key" style="display:none;">{{$profile.upubkey}}</div>{{/if}} {{if $profile.upubkey}}<div class="key u-key" style="display:none;">{{$profile.upubkey}}</div>{{/if}}
{{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}} {{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}}
@ -101,7 +108,7 @@
{{if $homepage}} {{if $homepage}}
<div class="homepage detail"> <div class="homepage detail">
<span class="homepage-label icon"><i class="fa fa-external-link-square"></i></span> <span class="homepage-label icon"><i class="fa fa-external-link"></i></span>
<span class="homepage-url u-url"><a href="{{$profile.homepage}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$profile.homepage}}</a></span> <span class="homepage-url u-url"><a href="{{$profile.homepage}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$profile.homepage}}</a></span>
</div> </div>
{{/if}} {{/if}}

View file

@ -129,6 +129,8 @@
{{include file="field_input.tpl" field=$xmpp}} {{include file="field_input.tpl" field=$xmpp}}
{{include file="field_input.tpl" field=$matrix}}
{{include file="field_input.tpl" field=$pub_keywords}} {{include file="field_input.tpl" field=$pub_keywords}}
{{include file="field_input.tpl" field=$prv_keywords}} {{include file="field_input.tpl" field=$prv_keywords}}

View file

@ -69,11 +69,18 @@
{{if $contact.xmpp}} {{if $contact.xmpp}}
<div class="xmpp detail"> <div class="xmpp detail">
<span class="xmpp-label icon"><i class="fa fa-comments"></i></span> <span class="xmpp-label icon"><i class="fa fa-xmpp"></i></span>
<span class="xmpp-data"><a href="xmpp:{{$contact.xmpp}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$contact.xmpp}}</a></span> <span class="xmpp-data"><a href="xmpp:{{$contact.xmpp}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$contact.xmpp}}</a></span>
</div> </div>
{{/if}} {{/if}}
{{if $contact.matrix}}
<div class="matrix detail">
<span class="matrix-label icon"><i class="fa fa-matrix-org"></i></span>
<span class="matrix-data"><a href="matrix:{{$contact.matrix}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$contact.matrix}}</a></span>
</div>
{{/if}}
{{if $network_link}} {{if $network_link}}
<div class="network detail"> <div class="network detail">
<span class="network-label icon"><i class="fa fa-{{$network_avatar}}"></i></span> <span class="network-label icon"><i class="fa fa-{{$network_avatar}}"></i></span>

View file

@ -42,6 +42,13 @@
</dl> </dl>
{{/if}} {{/if}}
{{if $profile.matrix}}
<dl class="matrix">
<dt class="matrix-label">{{$matrix}}</dt>
<dd class="matrix-data">{{$profile.matrix}}</dd>
</dl>
{{/if}}
{{if $profile.upubkey}}<div class="key" style="display:none;">{{$profile.upubkey}}</div>{{/if}} {{if $profile.upubkey}}<div class="key" style="display:none;">{{$profile.upubkey}}</div>{{/if}}
{{if $homepage}} {{if $homepage}}

View file

@ -52,6 +52,7 @@
<dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl> <dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location nofilter}}</dd></dl>{{/if}} {{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location nofilter}}</dd></dl>{{/if}}
{{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}} {{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
{{if $matrix}}<dl><dt>{{$matrix_label}}</dt><dd>{{$matrix}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}} {{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}} {{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}}
</div>{{* End of contact-edit-links *}} </div>{{* End of contact-edit-links *}}

View file

@ -36,6 +36,13 @@
</dl> </dl>
{{/if}} {{/if}}
{{if $profile.matrix}}
<dl class="matrix">
<dt class="matrix-label">{{$matrix}}</dt>
<dd class="matrix-data">{{$profile.matrix}}</dd>
</dl>
{{/if}}
{{if $profile.upubkey}}<div class="key u-key" style="display:none;">{{$profile.upubkey}}</div>{{/if}} {{if $profile.upubkey}}<div class="key u-key" style="display:none;">{{$profile.upubkey}}</div>{{/if}}
{{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}} {{if $contacts}}<div class="contacts" style="display:none;">{{$contacts}}</div>{{/if}}

View file

@ -67,6 +67,13 @@
<div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div> <div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div> <div id="profile-edit-xmpp-end"></div>
<div id="profile-edit-matrix-wrapper">
<label id="profile-edit-matrix-label" for="profile-edit-matrix">{{$matrix.1}} </label>
<input type="text" size="32" name="matrix" id="profile-edit-matrix" value="{{$matrix.2}}"/>
</div>
<div id="profile-edit-matrix-desc">{{$matrix.3}}</div>
<div id="profile-edit-matrix-end"></div>
<div id="profile-edit-homepage-wrapper"> <div id="profile-edit-homepage-wrapper">
<label id="profile-edit-homepage-label" for="profile-edit-homepage">{{$homepage.1}} </label> <label id="profile-edit-homepage-label" for="profile-edit-homepage">{{$homepage.1}} </label>
<input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage.2}}"/> <input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage.2}}"/>