Compare commits
10 commits
111df607bc
...
486b7caa46
Author | SHA1 | Date | |
---|---|---|---|
|
486b7caa46 | ||
|
013bba50bc | ||
|
5f0657a30c | ||
|
435b30be11 | ||
|
73863561d2 | ||
|
67696d08da | ||
|
1b00b91767 | ||
|
68c2bdb98e | ||
|
54852ecb56 | ||
|
8c4b2107b5 |
12 changed files with 31 additions and 19 deletions
|
@ -1039,7 +1039,7 @@ function photos_content(App $a)
|
|||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());
|
||||
|
||||
$params = ['order' => ['id'], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||
$items = Post::toArray(Post::selectForUser($link_item['uid'], Item::ITEM_FIELDLIST, $condition, $params));
|
||||
$items = Post::toArray(Post::selectForUser($link_item['uid'], array_merge(Item::ITEM_FIELDLIST, ['author-alias']), $condition, $params));
|
||||
|
||||
if (DI::userSession()->getLocalUserId() == $link_item['uid']) {
|
||||
Item::update(['unseen' => false], ['parent' => $link_item['parent']]);
|
||||
|
|
|
@ -362,6 +362,7 @@ class Conversation
|
|||
$tpl = Renderer::getMarkupTemplate('jot.tpl');
|
||||
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$post' => $this->l10n->t($x['content'] ? 'Post to group' : 'Post'),
|
||||
'$new_post' => $this->l10n->t('New Post'),
|
||||
'$return_path' => $this->args->getQueryString(),
|
||||
'$action' => 'item',
|
||||
|
|
|
@ -34,10 +34,11 @@ use Friendica\Core\Protocol;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Post\Category;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientOptions;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Network\HTTPException\ServiceUnavailableException;
|
||||
use Friendica\Protocol\Activity;
|
||||
|
@ -45,6 +46,7 @@ use Friendica\Protocol\ActivityPub;
|
|||
use Friendica\Protocol\Delivery;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
use Friendica\Util\Map;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Proxy;
|
||||
|
@ -3644,7 +3646,7 @@ class Item
|
|||
|
||||
if ($PostMedia->mimetype->type == 'video') {
|
||||
if (($PostMedia->height ?? 0) > ($PostMedia->width ?? 0)) {
|
||||
$height = min(DI::config()->get('system', 'max_video_height'), $PostMedia->height);
|
||||
$height = min(DI::config()->get('system', 'max_video_height') ?: '100%', $PostMedia->height);
|
||||
$width = 'auto';
|
||||
} else {
|
||||
$height = 'auto';
|
||||
|
@ -4094,9 +4096,12 @@ class Item
|
|||
return is_numeric($hookData['item_id']) ? $hookData['item_id'] : 0;
|
||||
}
|
||||
|
||||
$fetched_uri = ActivityPub\Processor::fetchMissingActivity($uri, [], '', $completion, $uid);
|
||||
$curlResult = DI::httpClient()->head($uri, [HttpClientOptions::ACCEPT_CONTENT => HttpClientAccept::JSON_AS]);
|
||||
if (HTTPSignature::isValidContentType($curlResult->getContentType())) {
|
||||
$fetched_uri = ActivityPub\Processor::fetchMissingActivity($uri, [], '', $completion, $uid);
|
||||
}
|
||||
|
||||
if ($fetched_uri) {
|
||||
if (!empty($fetched_uri)) {
|
||||
$item_id = self::searchByLink($fetched_uri, $uid);
|
||||
} else {
|
||||
$item_id = Diaspora::fetchByURL($uri);
|
||||
|
|
|
@ -846,6 +846,11 @@ class User
|
|||
self::update($fields, $user['uid']);
|
||||
// Set the last activity for all identities of the user
|
||||
DBA::update('user', $fields, ['parent-uid' => $user['uid'], 'verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false]);
|
||||
|
||||
if (!empty($user['parent-uid'])) {
|
||||
self::update($fields, $user['parent-uid']);
|
||||
DBA::update('user', $fields, ['parent-uid' => $user['parent-uid'], 'verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1610,7 +1610,7 @@ class Processor
|
|||
}
|
||||
|
||||
if (empty($object) || !is_array($object)) {
|
||||
Logger::notice('Invalid JSON data', ['url' => $url, 'content-type' => $curlResult->getContentType(), 'body' => $body]);
|
||||
Logger::notice('Invalid JSON data', ['url' => $url, 'content-type' => $curlResult->getContentType()]);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class OAuth
|
|||
}
|
||||
Logger::debug('Token found', $token);
|
||||
|
||||
$user = User::getById($token['uid'], ['uid', 'last-activity', 'login_date']);
|
||||
$user = User::getById($token['uid'], ['uid', 'parent-uid', 'last-activity', 'login_date']);
|
||||
if (!empty($user)) {
|
||||
User::updateLastActivity($user, false);
|
||||
}
|
||||
|
|
|
@ -407,6 +407,10 @@ return [
|
|||
// Maximum recursion depth when fetching posts until the job is delegated to a worker task or finished.
|
||||
'max_recursion_depth' => 50,
|
||||
|
||||
// max_video_height (Integer)
|
||||
// Maximum height of videos in portrait mode.
|
||||
'max_video_height' => 640,
|
||||
|
||||
// memcache_host (String)
|
||||
// Host name of the memcache daemon.
|
||||
'memcache_host' => '127.0.0.1',
|
||||
|
|
|
@ -84,8 +84,6 @@ $(document).ready(function () {
|
|||
let $mentionButton = $("#mention-link-button");
|
||||
if ($mentionButton.length) {
|
||||
$mentionButton.appendTo("#topbar-second > .container > #navbar-button").addClass("pull-right");
|
||||
$("#mention-link").addClass("btn-sm ");
|
||||
$("#mention-link > span i").addClass("fa-2x");
|
||||
if ($mentionButton.hasClass("modal-open")) {
|
||||
$mentionButton.on("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{* The button to open the jot - in This theme we move the button with js to the second nav bar *}}
|
||||
<a class="btn btn-sm btn-primary pull-right{{if !$always_open_compose}} modal-open{{/if}}" id="jotOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o fa-2x"></i></a>
|
||||
<a class="btn btn-primary pull-right{{if !$always_open_compose}} modal-open{{/if}}" id="jotOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o"></i><span class="">{{$post}}</span></a>
|
||||
|
||||
<div id="jot-content">
|
||||
<div id="jot-sections">
|
||||
|
|
|
@ -70,13 +70,12 @@
|
|||
</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $profile.addr}}
|
||||
<div id="mention-link-button">
|
||||
<button type="button" id="mention-link" class="btn btn-labeled btn-primary" onclick="openWallMessage('{{$mention_url}}')">
|
||||
<span class=""><i class="fa fa-pencil-square-o"></i></span>
|
||||
<span class="">{{$mention_label}}</span>
|
||||
</button>
|
||||
</div>
|
||||
{{if $profile.addr}}
|
||||
<div id="mention-link-button">
|
||||
<button type="button" id="mention-link" class="btn btn-labeled btn-primary" onclick="openWallMessage('{{$mention_url}}')" oncontextmenu="openWallMessage('compose/0'); return false;">
|
||||
<span class=""><i class="fa fa-pencil-square-o"></i></span>
|
||||
<span class="">{{$mention_label}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $network_label}}
|
||||
<div id="showgroup-button">
|
||||
|
|
|
@ -26,4 +26,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
{{/if}}
|
||||
{{if $mention_link}}
|
||||
<div id="mention-link-button">
|
||||
<button type="button" id="mention-link" class="btn btn-labeled btn-primary{{if !$always_open_compose}} modal-open{{/if}}" onclick="openWallMessage('{{$mention_link}}')" title="{{$mention}}" aria-label="{{$mention}}">
|
||||
<button type="button" id="mention-link" class="btn btn-labeled btn-primary{{if !$always_open_compose}} modal-open{{/if}}" onclick="openWallMessage('{{$mention_link}}')" oncontextmenu="openWallMessage('compose/0'); return false;" title="{{$mention}}" aria-label="{{$mention}}">
|
||||
<span class=""><i class="fa fa-pencil-square-o"></i></span>
|
||||
<span class="">{{$mention}}</span>
|
||||
</button>
|
||||
|
|
Loading…
Reference in a new issue