mirror of
https://github.com/friendica/friendica
synced 2025-04-27 05:50:10 +00:00
Merge remote-tracking branch 'upstream/develop' into post-user
This commit is contained in:
commit
3fe7d035d4
20 changed files with 44 additions and 61 deletions
|
@ -1113,7 +1113,7 @@ class Contact
|
|||
$contact = self::selectFirst(['id'], ['nurl' => $urls, 'uid' => $uid]);
|
||||
if (!empty($contact['id'])) {
|
||||
$contact_id = $contact['id'];
|
||||
Logger::info('Fetched id by url', ['cid' => $contact_id, 'uid' => $uid, 'url' => $url, 'probed_url' => $data['url'], 'alias' => $data['alias'], 'addr' => $data['addr']]);
|
||||
Logger::info('Fetched id by url', ['cid' => $contact_id, 'uid' => $uid, 'url' => $url, 'data' => $data]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3972,12 +3972,12 @@ class Item
|
|||
|
||||
// The causer is set during a thread completion, for example because of a reshare. It countains the responsible actor.
|
||||
if (!empty($item['causer-id']) && Contact\User::isBlocked($item['causer-id'], $user_id)) {
|
||||
Logger::notice('Causer is blocked by user', ['causer-link' => $item['causer-link'], 'uid' => $user_id, 'item-uri' => $item['uri']]);
|
||||
Logger::notice('Causer is blocked by user', ['causer-link' => $item['causer-link'] ?? $item['causer-id'], 'uid' => $user_id, 'item-uri' => $item['uri']]);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($item['causer-id']) && ($item['gravity'] === GRAVITY_PARENT) && Contact\User::isIgnored($item['causer-id'], $user_id)) {
|
||||
Logger::notice('Causer is ignored by user', ['causer-link' => $item['causer-link'], 'uid' => $user_id, 'item-uri' => $item['uri']]);
|
||||
Logger::notice('Causer is ignored by user', ['causer-link' => $item['causer-link'] ?? $item['causer-id'], 'uid' => $user_id, 'item-uri' => $item['uri']]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace Friendica\Module\Notifications;
|
|||
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -124,9 +125,11 @@ class Introductions extends BaseNotifications
|
|||
$knowyou = '';
|
||||
}
|
||||
|
||||
$convertedName = BBCode::convert($notification->getName());
|
||||
|
||||
$helptext = DI::l10n()->t('Shall your connection be bidirectional or not?');
|
||||
$helptext2 = DI::l10n()->t('Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed.', $notification->getName(), $notification->getName());
|
||||
$helptext3 = DI::l10n()->t('Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed.', $notification->getName());
|
||||
$helptext2 = DI::l10n()->t('Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed.', $convertedName, $convertedName);
|
||||
$helptext3 = DI::l10n()->t('Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed.', $convertedName);
|
||||
|
||||
$friend = ['duplex', DI::l10n()->t('Friend'), '1', $helptext2, true];
|
||||
$follower = ['duplex', DI::l10n()->t('Subscriber'), '0', $helptext3, false];
|
||||
|
|
|
@ -719,7 +719,7 @@ class Transmitter
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($isforum && ($contact['dfrn'] == Protocol::DFRN)) {
|
||||
if ($isforum && ($contact['network'] == Protocol::DFRN)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1565,7 +1565,6 @@ class Diaspora
|
|||
$datarray["gravity"] = GRAVITY_COMMENT;
|
||||
|
||||
$datarray['thr-parent'] = $thr_parent ?: $toplevel_parent_item['uri'];
|
||||
$datarray['parent-uri'] = $toplevel_parent_item['uri'];
|
||||
|
||||
$datarray["object-type"] = Activity\ObjectType::COMMENT;
|
||||
|
||||
|
@ -1963,7 +1962,6 @@ class Diaspora
|
|||
$datarray["verb"] = Activity::FOLLOW;
|
||||
$datarray["gravity"] = GRAVITY_ACTIVITY;
|
||||
$datarray['thr-parent'] = $toplevel_parent_item['uri'];
|
||||
$datarray['parent-uri'] = $toplevel_parent_item['parent-uri'];
|
||||
|
||||
$datarray["object-type"] = Activity\ObjectType::NOTE;
|
||||
|
||||
|
@ -2356,7 +2354,6 @@ class Diaspora
|
|||
$datarray['guid'] = $parent['guid'] . '-' . $guid;
|
||||
$datarray['uri'] = self::getUriFromGuid($author, $datarray['guid']);
|
||||
$datarray['thr-parent'] = $parent['uri'];
|
||||
$datarray['parent-uri'] = $parent['parent-uri'];
|
||||
|
||||
$datarray['verb'] = $datarray['body'] = Activity::ANNOUNCE;
|
||||
$datarray['gravity'] = GRAVITY_ACTIVITY;
|
||||
|
|
|
@ -521,12 +521,6 @@ class OStatus
|
|||
Logger::log("Item with uri ".self::$itemlist[0]['uri']." will be imported since the thread contains posts or shares.", Logger::DEBUG);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// But we will only import complete threads
|
||||
$valid = Item::exists(['uid' => $importer["uid"], 'uri' => self::$itemlist[0]['parent-uri']]);
|
||||
if ($valid) {
|
||||
Logger::log("Item with uri ".self::$itemlist[0]["uri"]." belongs to parent ".self::$itemlist[0]['thr-parent']." of user ".$importer["uid"].". It will be imported.", Logger::DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
if ($valid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue