Merge branch 'friendica:develop' into mastodon-api-reshare-fixes

This commit is contained in:
Hank G 2023-08-15 11:57:28 -04:00 committed by GitHub
commit f879b2c9bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 29 deletions

View File

@ -7,7 +7,7 @@ Fields
------
| Field | Description | Type | Null | Key | Default | Extra |
| ------------------------- | ------------------------------------------------------------ | ------------------ | ---- | --- | ------- | ----- |
| ------------------------- | ----------------------------------------------------------------------- | ------------------ | ---- | --- | ------- | ----- |
| cid | Contact id of the linked public contact | int unsigned | NO | PRI | 0 | |
| uid | User id | mediumint unsigned | NO | PRI | 0 | |
| uri-id | Id of the item-uri table entry that contains the contact url | int unsigned | YES | | NULL | |
@ -20,8 +20,8 @@ Fields
| rel | The kind of the relation between the user and the contact | tinyint unsigned | YES | | NULL | |
| info | | mediumtext | YES | | NULL | |
| notify_new_posts | | boolean | YES | | NULL | |
| remote_self | | boolean | YES | | NULL | |
| fetch_further_information | | tinyint unsigned | YES | | NULL | |
| remote_self | 0 => No mirroring, 1-2 => Mirror as own post, 3 => Mirror as reshare | tinyint unsigned | YES | | NULL | |
| fetch_further_information | 0 => None, 1 => Fetch information, 3 => Fetch keywords, 2 => Fetch both | tinyint unsigned | YES | | NULL | |
| ffi_keyword_denylist | | text | YES | | NULL | |
| subhub | | boolean | YES | | NULL | |
| hub-verify | | varbinary(383) | YES | | NULL | |

View File

@ -1365,6 +1365,17 @@ class Worker
return $new_retrial;
}
/**
* Get the number of retrials for the current worker task
*
* @return integer
*/
public static function getRetrial(): int
{
$queue = DI::app()->getQueue();
return $queue['retrial'] ?? 0;
}
/**
* Defers the current worker entry
*

View File

@ -126,7 +126,7 @@ class Emailer
* @return bool
* @throws InternalServerErrorException
*/
public function send(IEmail $email)
public function send(IEmail $email): bool
{
Hook::callAll('emailer_send_prepare', $email);
@ -161,8 +161,13 @@ class Emailer
. rand(100000000, 999999999) . '=:'
. rand(10000, 99999);
$messageHeader = $email->getAdditionalMailHeaderString();
if ($countMessageId === 0) {
$messageHeader .= 'Message-ID: <Friendica-Util-Emailer-' . Strings::getRandomHex() . '@' . $this->baseUrl->getHost() . '>' . "\r\n";
}
// generate a multipart/alternative message header
$messageHeader = $email->getAdditionalMailHeaderString() .
$messageHeader .=
"From: $fromName <{$fromAddress}>\r\n" .
"Reply-To: $fromName <{$replyTo}>\r\n" .
"MIME-Version: 1.0\r\n" .

View File

@ -21,6 +21,7 @@
namespace Friendica\Worker;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Worker;
@ -146,6 +147,8 @@ class Cron
// Update "blocked" status of servers
Worker::add(Worker::PRIORITY_LOW, 'UpdateBlockedServers');
Addon::reload();
DI::keyValue()->set('last_cron_daily', time());
}