More comprehensible check for root user contact #1525

Merged
heluecht merged 1 commit from mexon/friendica-addons:mat/mailstream-clarify-log into develop 2024-07-20 11:57:33 +02:00

View file

@ -144,12 +144,12 @@ function mailstream_post_hook(array &$item)
{ {
mailstream_check_version(); mailstream_check_version();
if (!DI::pConfig()->get($item['uid'], 'mailstream', 'enabled')) { if ($item['uid'] === 0) {
Logger::debug('mailstream not enabled.', ['item' => $item['id'], 'uid' => $item['uid']]); Logger::debug('mailstream: root user, skipping item ' . $item['id']);
return; return;
} }
if (!$item['uid']) { if (!DI::pConfig()->get($item['uid'], 'mailstream', 'enabled')) {
Logger::debug('no uid', ['item' => $item['id']]); Logger::debug('mailstream: not enabled.', ['item' => $item['id'], ' uid ' => $item['uid']]);
return; return;
} }
if (!$item['contact-id']) { if (!$item['contact-id']) {