Merge pull request #11796 from annando/post-reason
Improvements for the "post-reason"
This commit is contained in:
commit
1df0393d04
|
@ -138,7 +138,7 @@ function item_post(App $a) {
|
||||||
// When commenting on a public post then store the post for the current user
|
// When commenting on a public post then store the post for the current user
|
||||||
// This enables interaction like starring and saving into folders
|
// This enables interaction like starring and saving into folders
|
||||||
if ($toplevel_item['uid'] == 0) {
|
if ($toplevel_item['uid'] == 0) {
|
||||||
$stored = Item::storeForUserByUriId($toplevel_item['uri-id'], local_user());
|
$stored = Item::storeForUserByUriId($toplevel_item['uri-id'], local_user(), ['post-reason' => Item::PR_ACTIVITY]);
|
||||||
Logger::info('Public item stored for user', ['uri-id' => $toplevel_item['uri-id'], 'uid' => $uid, 'stored' => $stored]);
|
Logger::info('Public item stored for user', ['uri-id' => $toplevel_item['uri-id'], 'uid' => $uid, 'stored' => $stored]);
|
||||||
if ($stored) {
|
if ($stored) {
|
||||||
$toplevel_item = Post::selectFirst(Item::ITEM_FIELDLIST, ['id' => $stored]);
|
$toplevel_item = Post::selectFirst(Item::ITEM_FIELDLIST, ['id' => $stored]);
|
||||||
|
|
|
@ -857,7 +857,7 @@ class Conversation
|
||||||
$row['direction'] = ['direction' => 6, 'title' => $this->l10n->t('You are following %s.', $row['author-name'])];
|
$row['direction'] = ['direction' => 6, 'title' => $this->l10n->t('You are following %s.', $row['author-name'])];
|
||||||
break;
|
break;
|
||||||
case ItemModel::PR_TAG:
|
case ItemModel::PR_TAG:
|
||||||
$row['direction'] = ['direction' => 4, 'title' => $this->l10n->t('Tagged')];
|
$row['direction'] = ['direction' => 4, 'title' => $this->l10n->t('You subscribed to one or more tags in this post.')];
|
||||||
break;
|
break;
|
||||||
case ItemModel::PR_ANNOUNCEMENT:
|
case ItemModel::PR_ANNOUNCEMENT:
|
||||||
if (!empty($row['causer-id']) && $this->pConfig->get(local_user(), 'system', 'display_resharer')) {
|
if (!empty($row['causer-id']) && $this->pConfig->get(local_user(), 'system', 'display_resharer')) {
|
||||||
|
@ -878,17 +878,32 @@ class Conversation
|
||||||
$row['direction'] = ['direction' => 5, 'title' => $this->l10n->t('%s is participating in this thread.', $row['author-name'])];
|
$row['direction'] = ['direction' => 5, 'title' => $this->l10n->t('%s is participating in this thread.', $row['author-name'])];
|
||||||
break;
|
break;
|
||||||
case ItemModel::PR_STORED:
|
case ItemModel::PR_STORED:
|
||||||
$row['direction'] = ['direction' => 8, 'title' => $this->l10n->t('Stored')];
|
$row['direction'] = ['direction' => 8, 'title' => $this->l10n->t('Stored for general reasons')];
|
||||||
break;
|
break;
|
||||||
case ItemModel::PR_GLOBAL:
|
case ItemModel::PR_GLOBAL:
|
||||||
$row['direction'] = ['direction' => 9, 'title' => $this->l10n->t('Global')];
|
$row['direction'] = ['direction' => 9, 'title' => $this->l10n->t('Global post')];
|
||||||
break;
|
break;
|
||||||
case ItemModel::PR_RELAY:
|
case ItemModel::PR_RELAY:
|
||||||
$row['direction'] = ['direction' => 10, 'title' => (empty($row['causer-id']) ? $this->l10n->t('Relayed') : $this->l10n->t('Relayed by %s <%s>', $row['causer-name'], $row['causer-link']))];
|
$row['direction'] = ['direction' => 10, 'title' => (empty($row['causer-id']) ? $this->l10n->t('Sent via an relay server') : $this->l10n->t('Sent via the relay server %s <%s>', $row['causer-name'], $row['causer-link']))];
|
||||||
break;
|
break;
|
||||||
case ItemModel::PR_FETCHED:
|
case ItemModel::PR_FETCHED:
|
||||||
$row['direction'] = ['direction' => 2, 'title' => (empty($row['causer-id']) ? $this->l10n->t('Fetched') : $this->l10n->t('Fetched because of %s <%s>', $row['causer-name'], $row['causer-link']))];
|
$row['direction'] = ['direction' => 2, 'title' => (empty($row['causer-id']) ? $this->l10n->t('Fetched') : $this->l10n->t('Fetched because of %s <%s>', $row['causer-name'], $row['causer-link']))];
|
||||||
break;
|
break;
|
||||||
|
case ItemModel::PR_COMPLETION:
|
||||||
|
$row['direction'] = ['direction' => 2, 'title' => $this->l10n->t('Stored because of a child post to complete this thread.')];
|
||||||
|
break;
|
||||||
|
case ItemModel::PR_DIRECT:
|
||||||
|
$row['direction'] = ['direction' => 6, 'title' => $this->l10n->t('Local delivery')];
|
||||||
|
break;
|
||||||
|
case ItemModel::PR_ACTIVITY:
|
||||||
|
$row['direction'] = ['direction' => 2, 'title' => $this->l10n->t('Stored because of your activity (like, comment, star, ...)')];
|
||||||
|
break;
|
||||||
|
case ItemModel::PR_DISTRIBUTE:
|
||||||
|
$row['direction'] = ['direction' => 6, 'title' => $this->l10n->t('Distributed')];
|
||||||
|
break;
|
||||||
|
case ItemModel::PR_PUSHED:
|
||||||
|
$row['direction'] = ['direction' => 1, 'title' => $this->l10n->t('Pushed to us')];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$row['thr-parent-row'] = $thr_parent;
|
$row['thr-parent-row'] = $thr_parent;
|
||||||
|
|
|
@ -383,11 +383,11 @@ class APContact
|
||||||
if (strlen($apcontact['photo']) > 255) {
|
if (strlen($apcontact['photo']) > 255) {
|
||||||
$parts = parse_url($apcontact['photo']);
|
$parts = parse_url($apcontact['photo']);
|
||||||
unset($parts['fragment']);
|
unset($parts['fragment']);
|
||||||
$apcontact['photo'] = Uri::fromParts($parts);
|
$apcontact['photo'] = (string)Uri::fromParts($parts);
|
||||||
|
|
||||||
if (strlen($apcontact['photo']) > 255) {
|
if (strlen($apcontact['photo']) > 255) {
|
||||||
unset($parts['query']);
|
unset($parts['query']);
|
||||||
$apcontact['photo'] = Uri::fromParts($parts);
|
$apcontact['photo'] = (string)Uri::fromParts($parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($apcontact['photo']) > 255) {
|
if (strlen($apcontact['photo']) > 255) {
|
||||||
|
|
|
@ -44,6 +44,7 @@ use Friendica\Util\Proxy;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
use Friendica\Worker\Delivery;
|
use Friendica\Worker\Delivery;
|
||||||
|
use GuzzleHttp\Psr7\Uri;
|
||||||
use LanguageDetection\Language;
|
use LanguageDetection\Language;
|
||||||
|
|
||||||
class Item
|
class Item
|
||||||
|
@ -74,6 +75,12 @@ class Item
|
||||||
const PR_GLOBAL = 73;
|
const PR_GLOBAL = 73;
|
||||||
const PR_RELAY = 74;
|
const PR_RELAY = 74;
|
||||||
const PR_FETCHED = 75;
|
const PR_FETCHED = 75;
|
||||||
|
const PR_COMPLETION = 76;
|
||||||
|
const PR_DIRECT = 77;
|
||||||
|
const PR_ACTIVITY = 78;
|
||||||
|
const PR_DISTRIBUTE = 79;
|
||||||
|
const PR_PUSHED = 80;
|
||||||
|
const PR_LOCAL = 81;
|
||||||
|
|
||||||
// system.accept_only_sharer setting values
|
// system.accept_only_sharer setting values
|
||||||
const COMPLETION_NONE = 1;
|
const COMPLETION_NONE = 1;
|
||||||
|
@ -688,9 +695,9 @@ class Item
|
||||||
$parent = Post::selectFirst($fields, $condition, $params);
|
$parent = Post::selectFirst($fields, $condition, $params);
|
||||||
|
|
||||||
if (!DBA::isResult($parent) && Post::exists(['uri-id' => [$item['thr-parent-id'], $item['parent-uri-id']], 'uid' => 0])) {
|
if (!DBA::isResult($parent) && Post::exists(['uri-id' => [$item['thr-parent-id'], $item['parent-uri-id']], 'uid' => 0])) {
|
||||||
$stored = Item::storeForUserByUriId($item['thr-parent-id'], $item['uid']);
|
$stored = Item::storeForUserByUriId($item['thr-parent-id'], $item['uid'], ['post-reason' => Item::PR_COMPLETION]);
|
||||||
if (!$stored && ($item['thr-parent-id'] != $item['parent-uri-id'])) {
|
if (!$stored && ($item['thr-parent-id'] != $item['parent-uri-id'])) {
|
||||||
$stored = Item::storeForUserByUriId($item['parent-uri-id'], $item['uid']);
|
$stored = Item::storeForUserByUriId($item['parent-uri-id'], $item['uid'], ['post-reason' => Item::PR_COMPLETION]);
|
||||||
}
|
}
|
||||||
if ($stored) {
|
if ($stored) {
|
||||||
Logger::info('Stored thread parent item for user', ['uri-id' => $item['thr-parent-id'], 'uid' => $item['uid'], 'stored' => $stored]);
|
Logger::info('Stored thread parent item for user', ['uri-id' => $item['thr-parent-id'], 'uid' => $item['uid'], 'stored' => $stored]);
|
||||||
|
@ -714,7 +721,7 @@ class Item
|
||||||
$toplevel_parent = Post::selectFirst($fields, $condition, $params);
|
$toplevel_parent = Post::selectFirst($fields, $condition, $params);
|
||||||
|
|
||||||
if (!DBA::isResult($toplevel_parent) && $item['origin']) {
|
if (!DBA::isResult($toplevel_parent) && $item['origin']) {
|
||||||
$stored = Item::storeForUserByUriId($item['parent-uri-id'], $item['uid']);
|
$stored = Item::storeForUserByUriId($item['parent-uri-id'], $item['uid'], ['post-reason' => Item::PR_COMPLETION]);
|
||||||
Logger::info('Stored parent item for user', ['uri-id' => $item['parent-uri-id'], 'uid' => $item['uid'], 'stored' => $stored]);
|
Logger::info('Stored parent item for user', ['uri-id' => $item['parent-uri-id'], 'uid' => $item['uid'], 'stored' => $stored]);
|
||||||
$toplevel_parent = Post::selectFirst($fields, $condition, $params);
|
$toplevel_parent = Post::selectFirst($fields, $condition, $params);
|
||||||
}
|
}
|
||||||
|
@ -903,6 +910,10 @@ class Item
|
||||||
$item['post-reason'] = self::PR_FOLLOWER;
|
$item['post-reason'] = self::PR_FOLLOWER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($item['origin'] && empty($item['post-reason'])) {
|
||||||
|
$item['post-reason'] = self::PR_LOCAL;
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure that there is an avatar cache
|
// Ensure that there is an avatar cache
|
||||||
Contact::checkAvatarCache($item['author-id']);
|
Contact::checkAvatarCache($item['author-id']);
|
||||||
Contact::checkAvatarCache($item['owner-id']);
|
Contact::checkAvatarCache($item['owner-id']);
|
||||||
|
@ -1355,14 +1366,8 @@ class Item
|
||||||
|
|
||||||
$uids = Tag::getUIDListByURIId($item['uri-id']);
|
$uids = Tag::getUIDListByURIId($item['uri-id']);
|
||||||
foreach ($uids as $uid) {
|
foreach ($uids as $uid) {
|
||||||
if (Contact::isSharing($item['author-id'], $uid)) {
|
$stored = self::storeForUserByUriId($item['uri-id'], $uid, ['post-reason' => self::PR_TAG]);
|
||||||
$fields = [];
|
Logger::info('Stored item for users', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'stored' => $stored]);
|
||||||
} else {
|
|
||||||
$fields = ['post-reason' => self::PR_TAG];
|
|
||||||
}
|
|
||||||
|
|
||||||
$stored = self::storeForUserByUriId($item['uri-id'], $uid, $fields);
|
|
||||||
Logger::info('Stored item for users', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'fields' => $fields, 'stored' => $stored]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1454,6 +1459,7 @@ class Item
|
||||||
if ($origin_uid == $uid) {
|
if ($origin_uid == $uid) {
|
||||||
$item['diaspora_signed_text'] = $signed_text;
|
$item['diaspora_signed_text'] = $signed_text;
|
||||||
}
|
}
|
||||||
|
$item['post-reason'] = self::PR_DISTRIBUTE;
|
||||||
self::storeForUser($item, $uid);
|
self::storeForUser($item, $uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1605,7 +1611,6 @@ class Item
|
||||||
unset($item['event-id']);
|
unset($item['event-id']);
|
||||||
unset($item['hidden']);
|
unset($item['hidden']);
|
||||||
unset($item['notification-type']);
|
unset($item['notification-type']);
|
||||||
unset($item['post-reason']);
|
|
||||||
|
|
||||||
// Data from the "post-delivery-data" table
|
// Data from the "post-delivery-data" table
|
||||||
unset($item['postopts']);
|
unset($item['postopts']);
|
||||||
|
@ -2488,7 +2493,7 @@ class Item
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Post::exists(['uri-id' => $item['parent-uri-id'], 'uid' => $uid])) {
|
if (!Post::exists(['uri-id' => $item['parent-uri-id'], 'uid' => $uid])) {
|
||||||
$stored = self::storeForUserByUriId($item['parent-uri-id'], $uid);
|
$stored = self::storeForUserByUriId($item['parent-uri-id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
||||||
if (($item['parent-uri-id'] == $item['uri-id']) && !empty($stored)) {
|
if (($item['parent-uri-id'] == $item['uri-id']) && !empty($stored)) {
|
||||||
$item = Post::selectFirst(self::ITEM_FIELDLIST, ['id' => $stored]);
|
$item = Post::selectFirst(self::ITEM_FIELDLIST, ['id' => $stored]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
|
@ -2946,9 +2951,13 @@ class Item
|
||||||
{
|
{
|
||||||
// Make sure that for example site parameters aren't used when testing if the link is contained in the body
|
// Make sure that for example site parameters aren't used when testing if the link is contained in the body
|
||||||
$urlparts = parse_url($url);
|
$urlparts = parse_url($url);
|
||||||
unset($urlparts['query']);
|
if (!empty($urlparts)) {
|
||||||
unset($urlparts['fragment']);
|
unset($urlparts['query']);
|
||||||
$url = Network::unparseURL($urlparts);
|
unset($urlparts['fragment']);
|
||||||
|
$url = (string)Uri::fromParts($urlparts);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Remove media links to only search in embedded content
|
// Remove media links to only search in embedded content
|
||||||
// @todo Check images for image link, audio for audio links, ...
|
// @todo Check images for image link, audio for audio links, ...
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Bookmark extends BaseApi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['uid'] == 0) {
|
if ($item['uid'] == 0) {
|
||||||
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid);
|
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
||||||
if (!empty($stored)) {
|
if (!empty($stored)) {
|
||||||
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Unbookmark extends BaseApi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['uid'] == 0) {
|
if ($item['uid'] == 0) {
|
||||||
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid);
|
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
||||||
if (!empty($stored)) {
|
if (!empty($stored)) {
|
||||||
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Star extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['uid'] == 0) {
|
if ($item['uid'] == 0) {
|
||||||
$stored = Item::storeForUserByUriId($item['uri-id'], local_user());
|
$stored = Item::storeForUserByUriId($item['uri-id'], local_user(), ['post-reason' => Item::PR_ACTIVITY]);
|
||||||
if (!empty($stored)) {
|
if (!empty($stored)) {
|
||||||
$item = Post::selectFirst(['starred'], ['id' => $stored]);
|
$item = Post::selectFirst(['starred'], ['id' => $stored]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
|
|
|
@ -110,10 +110,7 @@ class Delivery
|
||||||
} elseif ($cmd == WorkerDelivery::PROFILEUPDATE) {
|
} elseif ($cmd == WorkerDelivery::PROFILEUPDATE) {
|
||||||
$success = ActivityPub\Transmitter::sendProfileUpdate($uid, $inbox);
|
$success = ActivityPub\Transmitter::sendProfileUpdate($uid, $inbox);
|
||||||
} else {
|
} else {
|
||||||
$data = Post\Activity::getByURIId($uri_id);
|
$data = ActivityPub\Transmitter::createCachedActivityFromItem($item_id);
|
||||||
if (empty($data)) {
|
|
||||||
$data = ActivityPub\Transmitter::createCachedActivityFromItem($item_id);
|
|
||||||
}
|
|
||||||
if (!empty($data)) {
|
if (!empty($data)) {
|
||||||
$timestamp = microtime(true);
|
$timestamp = microtime(true);
|
||||||
$response = HTTPSignature::post($data, $inbox, $uid);
|
$response = HTTPSignature::post($data, $inbox, $uid);
|
||||||
|
|
|
@ -363,10 +363,10 @@ class Processor
|
||||||
if (!empty($activity['raw'])) {
|
if (!empty($activity['raw'])) {
|
||||||
$item['source'] = $activity['raw'];
|
$item['source'] = $activity['raw'];
|
||||||
$item['protocol'] = Conversation::PARCEL_ACTIVITYPUB;
|
$item['protocol'] = Conversation::PARCEL_ACTIVITYPUB;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($activity['push'])) {
|
if (isset($activity['push'])) {
|
||||||
$item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL;
|
$item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($activity['from-relay'])) {
|
if (!empty($activity['from-relay'])) {
|
||||||
|
@ -900,6 +900,8 @@ class Processor
|
||||||
$item['post-reason'] = Item::PR_RELAY;
|
$item['post-reason'] = Item::PR_RELAY;
|
||||||
} elseif (!empty($activity['thread-completion'])) {
|
} elseif (!empty($activity['thread-completion'])) {
|
||||||
$item['post-reason'] = Item::PR_FETCHED;
|
$item['post-reason'] = Item::PR_FETCHED;
|
||||||
|
} elseif (in_array($item['post-reason'], [Item::PR_GLOBAL, Item::PR_NONE]) && !empty($activity['push'])) {
|
||||||
|
$item['post-reason'] = Item::PR_PUSHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['isForum'] ?? false) {
|
if ($item['isForum'] ?? false) {
|
||||||
|
|
|
@ -986,7 +986,7 @@ class Receiver
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($reply)) {
|
if (!empty($reply)) {
|
||||||
$parents = Post::select(['uid'], ['uri' => $reply]);
|
$parents = Post::select(['uid'], DBA::mergeConditions(['uri' => $reply], ["`uid` != ?", 0]));
|
||||||
while ($parent = Post::fetch($parents)) {
|
while ($parent = Post::fetch($parents)) {
|
||||||
$receivers[$parent['uid']] = ['uid' => $parent['uid'], 'type' => self::TARGET_ANSWER];
|
$receivers[$parent['uid']] = ['uid' => $parent['uid'], 'type' => self::TARGET_ANSWER];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1233,26 +1233,20 @@ class Transmitter
|
||||||
if (!$item['deleted']) {
|
if (!$item['deleted']) {
|
||||||
$data = Post\Activity::getByURIId($item['uri-id']);
|
$data = Post\Activity::getByURIId($item['uri-id']);
|
||||||
if (!$item['origin'] && !empty($data)) {
|
if (!$item['origin'] && !empty($data)) {
|
||||||
if (!empty($data['type'])) {
|
if ($object_mode) {
|
||||||
if (in_array($data['type'], ['Create', 'Update'])) {
|
unset($data['@context']);
|
||||||
if ($object_mode) {
|
unset($data['signature']);
|
||||||
unset($data['@context']);
|
|
||||||
unset($data['signature']);
|
|
||||||
}
|
|
||||||
Logger::info('Return stored conversation', ['item' => $item_id]);
|
|
||||||
return $data;
|
|
||||||
} elseif (in_array('as:' . $data['type'], Receiver::CONTENT_TYPES)) {
|
|
||||||
if (!empty($data['@context'])) {
|
|
||||||
$context = $data['@context'];
|
|
||||||
unset($data['@context']);
|
|
||||||
}
|
|
||||||
unset($data['actor']);
|
|
||||||
$object = $data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Logger::info('Return stored conversation', ['item' => $item_id]);
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$item['origin'] && empty($object)) {
|
||||||
|
Logger::debug('Post is not ours and is not stored', ['id' => $item_id, 'uri-id' => $item['uri-id']]);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$type = self::getTypeOfItem($item);
|
$type = self::getTypeOfItem($item);
|
||||||
|
|
||||||
if (!$object_mode) {
|
if (!$object_mode) {
|
||||||
|
|
|
@ -998,7 +998,7 @@ class DFRN
|
||||||
$path_parts = explode('/', $parts['path']);
|
$path_parts = explode('/', $parts['path']);
|
||||||
array_pop($path_parts);
|
array_pop($path_parts);
|
||||||
$parts['path'] = implode('/', $path_parts);
|
$parts['path'] = implode('/', $path_parts);
|
||||||
$contact['batch'] = Uri::fromParts($parts);
|
$contact['batch'] = (string)Uri::fromParts($parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dest_url = ($public_batch ? $contact['batch'] : $contact['notify']);
|
$dest_url = ($public_batch ? $contact['batch'] : $contact['notify']);
|
||||||
|
|
|
@ -1419,7 +1419,7 @@ class Diaspora
|
||||||
|
|
||||||
$parts = parse_url($person['url']);
|
$parts = parse_url($person['url']);
|
||||||
unset($parts['path']);
|
unset($parts['path']);
|
||||||
$host_url = Uri::fromParts($parts);
|
$host_url = (string)Uri::fromParts($parts);
|
||||||
|
|
||||||
return $host_url . '/objects/' . $guid;
|
return $host_url . '/objects/' . $guid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -497,7 +497,7 @@ class Network
|
||||||
$parts = parse_url($uri);
|
$parts = parse_url($uri);
|
||||||
if (!empty($parts['scheme']) && !empty($parts['host'])) {
|
if (!empty($parts['scheme']) && !empty($parts['host'])) {
|
||||||
$parts['host'] = idn_to_ascii($parts['host']);
|
$parts['host'] = idn_to_ascii($parts['host']);
|
||||||
$uri = Uri::fromParts($parts);
|
$uri = (string)Uri::fromParts($parts);
|
||||||
} else {
|
} else {
|
||||||
$parts = explode('@', $uri);
|
$parts = explode('@', $uri);
|
||||||
if (count($parts) == 2) {
|
if (count($parts) == 2) {
|
||||||
|
|
|
@ -506,7 +506,7 @@ class Notifier
|
||||||
// Direct delivery of local contacts
|
// Direct delivery of local contacts
|
||||||
if (!in_array($cmd, [Delivery::RELOCATION, Delivery::SUGGESTION, Delivery::DELETION, Delivery::MAIL]) && $target_uid = User::getIdForURL($contact['url'])) {
|
if (!in_array($cmd, [Delivery::RELOCATION, Delivery::SUGGESTION, Delivery::DELETION, Delivery::MAIL]) && $target_uid = User::getIdForURL($contact['url'])) {
|
||||||
Logger::info('Direct delivery', ['uri-id' => $target_item['uri-id'], 'target' => $target_uid]);
|
Logger::info('Direct delivery', ['uri-id' => $target_item['uri-id'], 'target' => $target_uid]);
|
||||||
$fields = ['protocol' => Conversation::PARCEL_LOCAL_DFRN, 'direction' => Conversation::PUSH];
|
$fields = ['protocol' => Conversation::PARCEL_LOCAL_DFRN, 'direction' => Conversation::PUSH, 'post-reason' => Item::PR_DIRECT];
|
||||||
Item::storeForUserByUriId($target_item['uri-id'], $target_uid, $fields, $target_item['uid']);
|
Item::storeForUserByUriId($target_item['uri-id'], $target_uid, $fields, $target_item['uid']);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 2022.09-dev\n"
|
"Project-Id-Version: 2022.09-dev\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-07-27 22:28-0400\n"
|
"POT-Creation-Date: 2022-07-29 21:32+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -1411,7 +1411,7 @@ msgstr ""
|
||||||
msgid "Friend Suggestions"
|
msgid "Friend Suggestions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/tagger.php:78 src/Content/Item.php:354 src/Model/Item.php:2749
|
#: mod/tagger.php:78 src/Content/Item.php:354 src/Model/Item.php:2754
|
||||||
msgid "photo"
|
msgid "photo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2111,7 +2111,7 @@ msgid "You are following %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:860
|
#: src/Content/Conversation.php:860
|
||||||
msgid "Tagged"
|
msgid "You subscribed to one or more tags in this post."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:875
|
#: src/Content/Conversation.php:875
|
||||||
|
@ -2129,20 +2129,20 @@ msgid "%s is participating in this thread."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:881
|
#: src/Content/Conversation.php:881
|
||||||
msgid "Stored"
|
msgid "Stored for general reasons"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:884
|
#: src/Content/Conversation.php:884
|
||||||
msgid "Global"
|
msgid "Global post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:887
|
#: src/Content/Conversation.php:887
|
||||||
msgid "Relayed"
|
msgid "Sent via an relay server"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:887
|
#: src/Content/Conversation.php:887
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Relayed by %s <%s>"
|
msgid "Sent via the relay server %s <%s>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Conversation.php:890
|
#: src/Content/Conversation.php:890
|
||||||
|
@ -2154,6 +2154,26 @@ msgstr ""
|
||||||
msgid "Fetched because of %s <%s>"
|
msgid "Fetched because of %s <%s>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:893
|
||||||
|
msgid "Stored because of a child post to complete this thread."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:896
|
||||||
|
msgid "Local delivery"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:899
|
||||||
|
msgid "Stored because of your activity (like, comment, star, ...)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:902
|
||||||
|
msgid "Distributed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Conversation.php:905
|
||||||
|
msgid "Pushed to us"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Feature.php:96
|
#: src/Content/Feature.php:96
|
||||||
msgid "General Features"
|
msgid "General Features"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2275,7 +2295,7 @@ msgstr ""
|
||||||
msgid "%1$s poked %2$s"
|
msgid "%1$s poked %2$s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Item.php:345 src/Model/Item.php:2747
|
#: src/Content/Item.php:345 src/Model/Item.php:2752
|
||||||
msgid "event"
|
msgid "event"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2626,8 +2646,8 @@ msgid ""
|
||||||
"<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
|
"<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Text/BBCode.php:1213 src/Model/Item.php:3322
|
#: src/Content/Text/BBCode.php:1213 src/Model/Item.php:3331
|
||||||
#: src/Model/Item.php:3328 src/Model/Item.php:3329
|
#: src/Model/Item.php:3337 src/Model/Item.php:3338
|
||||||
msgid "Link to source"
|
msgid "Link to source"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -3812,58 +3832,58 @@ msgstr ""
|
||||||
msgid "Edit groups"
|
msgid "Edit groups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:1845
|
#: src/Model/Item.php:1850
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Detected languages in this post:\\n%s"
|
msgid "Detected languages in this post:\\n%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:2751
|
#: src/Model/Item.php:2756
|
||||||
msgid "activity"
|
msgid "activity"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:2753
|
#: src/Model/Item.php:2758
|
||||||
msgid "comment"
|
msgid "comment"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:2756
|
#: src/Model/Item.php:2761
|
||||||
msgid "post"
|
msgid "post"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:2872
|
#: src/Model/Item.php:2877
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Content warning: %s"
|
msgid "Content warning: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:3231
|
#: src/Model/Item.php:3240
|
||||||
msgid "bytes"
|
msgid "bytes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:3265
|
|
||||||
#, php-format
|
|
||||||
msgid "%s (%d%s, %d votes)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/Model/Item.php:3267
|
|
||||||
#, php-format
|
|
||||||
msgid "%s (%d votes)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/Model/Item.php:3272
|
|
||||||
#, php-format
|
|
||||||
msgid "%d voters. Poll end: %s"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/Model/Item.php:3274
|
#: src/Model/Item.php:3274
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%d voters."
|
msgid "%s (%d%s, %d votes)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:3276
|
#: src/Model/Item.php:3276
|
||||||
#, php-format
|
#, php-format
|
||||||
|
msgid "%s (%d votes)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3281
|
||||||
|
#, php-format
|
||||||
|
msgid "%d voters. Poll end: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3283
|
||||||
|
#, php-format
|
||||||
|
msgid "%d voters."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Model/Item.php:3285
|
||||||
|
#, php-format
|
||||||
msgid "Poll end: %s"
|
msgid "Poll end: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Item.php:3310 src/Model/Item.php:3311
|
#: src/Model/Item.php:3319 src/Model/Item.php:3320
|
||||||
msgid "View on separate page"
|
msgid "View on separate page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4265,12 +4285,12 @@ msgid ""
|
||||||
"\t\t\tThank you and welcome to %2$s."
|
"\t\t\tThank you and welcome to %2$s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Moderation/DomainPatternBlocklist.php:144
|
#: src/Moderation/DomainPatternBlocklist.php:218
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "[%s] Notice of remote server domain pattern block list update"
|
msgid "[%s] Notice of remote server domain pattern block list update"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Moderation/DomainPatternBlocklist.php:146
|
#: src/Moderation/DomainPatternBlocklist.php:220
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Dear %s,\n"
|
"Dear %s,\n"
|
||||||
|
@ -8424,19 +8444,19 @@ msgstr ""
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329
|
#: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329
|
||||||
#: src/Module/Profile/Status.php:66 src/Module/Profile/Status.php:69
|
#: src/Module/Profile/Status.php:66 src/Module/Profile/Status.php:69
|
||||||
#: src/Protocol/Feed.php:1018 src/Protocol/OStatus.php:1045
|
#: src/Protocol/Feed.php:1018 src/Protocol/OStatus.php:1046
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's timeline"
|
msgid "%s's timeline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:67
|
#: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:67
|
||||||
#: src/Protocol/Feed.php:1022 src/Protocol/OStatus.php:1050
|
#: src/Protocol/Feed.php:1022 src/Protocol/OStatus.php:1051
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's posts"
|
msgid "%s's posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:68
|
#: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:68
|
||||||
#: src/Protocol/Feed.php:1025 src/Protocol/OStatus.php:1054
|
#: src/Protocol/Feed.php:1025 src/Protocol/OStatus.php:1055
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's comments"
|
msgid "%s's comments"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -10946,21 +10966,21 @@ msgstr ""
|
||||||
msgid "Show fewer"
|
msgid "Show fewer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Protocol/OStatus.php:1474
|
#: src/Protocol/OStatus.php:1475
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s is now following %s."
|
msgid "%s is now following %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Protocol/OStatus.php:1475
|
#: src/Protocol/OStatus.php:1476
|
||||||
msgid "following"
|
msgid "following"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Protocol/OStatus.php:1478
|
#: src/Protocol/OStatus.php:1479
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s stopped following %s."
|
msgid "%s stopped following %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Protocol/OStatus.php:1479
|
#: src/Protocol/OStatus.php:1480
|
||||||
msgid "stopped following"
|
msgid "stopped following"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue