]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Transmitter.php
Replaced deprecated "log" function call
[friendica.git] / src / Protocol / ActivityPub / Transmitter.php
index f0ed0cf5a897d2f0fae698f02c29101ed349c116..44b0463b033b4e73e799937ddd6d617cb77bb356 100644 (file)
@@ -23,7 +23,7 @@ namespace Friendica\Protocol\ActivityPub;
 
 use Friendica\Content\Feature;
 use Friendica\Content\Text\BBCode;
-use Friendica\Core\Cache\Duration;
+use Friendica\Core\Cache\Enum\Duration;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\System;
@@ -229,7 +229,7 @@ class Transmitter
                                $permissionSets = DI::permissionSet()->selectByContactId($requester_id, $owner['uid']);
                                if (!empty($permissionSets)) {
                                        $condition = ['psid' => array_merge($permissionSets->column('id'),
-                                                       [DI::permissionSet()->selectPublic($owner['uid'])])];
+                                                       [DI::permissionSet()->selectPublicForUser($owner['uid'])])];
                                }
                        }
                }
@@ -1782,7 +1782,7 @@ class Transmitter
        {
                $owner = User::getOwnerDataById($uid);
 
-               $suggestion = DI::fsuggest()->getById($suggestion_id);
+               $suggestion = DI::fsuggest()->selectOneById($suggestion_id);
 
                $data = ['@context' => ActivityPub::CONTEXT,
                        'id' => DI::baseUrl() . '/activity/' . System::createGUID(),
@@ -1796,7 +1796,7 @@ class Transmitter
 
                $signed = LDSignature::sign($data, $owner);
 
-               Logger::log('Deliver profile deletion for user ' . $uid . ' to ' . $inbox . ' via ActivityPub', Logger::DEBUG);
+               Logger::info('Deliver profile deletion for user ' . $uid . ' to ' . $inbox . ' via ActivityPub');
                return HTTPSignature::transmit($signed, $inbox, $uid);
        }
 
@@ -1825,7 +1825,7 @@ class Transmitter
 
                $signed = LDSignature::sign($data, $owner);
 
-               Logger::log('Deliver profile relocation for user ' . $uid . ' to ' . $inbox . ' via ActivityPub', Logger::DEBUG);
+               Logger::info('Deliver profile relocation for user ' . $uid . ' to ' . $inbox . ' via ActivityPub');
                return HTTPSignature::transmit($signed, $inbox, $uid);
        }
 
@@ -1864,7 +1864,7 @@ class Transmitter
 
                $signed = LDSignature::sign($data, $owner);
 
-               Logger::log('Deliver profile deletion for user ' . $uid . ' to ' . $inbox . ' via ActivityPub', Logger::DEBUG);
+               Logger::info('Deliver profile deletion for user ' . $uid . ' to ' . $inbox . ' via ActivityPub');
                return HTTPSignature::transmit($signed, $inbox, $uid);
        }
 
@@ -1896,7 +1896,7 @@ class Transmitter
 
                $signed = LDSignature::sign($data, $owner);
 
-               Logger::log('Deliver profile update for user ' . $uid . ' to ' . $inbox . ' via ActivityPub', Logger::DEBUG);
+               Logger::info('Deliver profile update for user ' . $uid . ' to ' . $inbox . ' via ActivityPub');
                return HTTPSignature::transmit($signed, $inbox, $uid);
        }
 
@@ -1933,7 +1933,7 @@ class Transmitter
                        'instrument' => self::getService(),
                        'to' => [$profile['url']]];
 
-               Logger::log('Sending activity ' . $activity . ' to ' . $target . ' for user ' . $uid, Logger::DEBUG);
+               Logger::info('Sending activity ' . $activity . ' to ' . $target . ' for user ' . $uid);
 
                $signed = LDSignature::sign($data, $owner);
                return HTTPSignature::transmit($signed, $profile['inbox'], $uid);
@@ -1972,7 +1972,7 @@ class Transmitter
                $condition = ['verb' => Activity::FOLLOW, 'uid' => 0, 'parent-uri' => $object,
                        'author-id' => Contact::getPublicIdByUserId($uid)];
                if (Post::exists($condition)) {
-                       Logger::log('Follow for ' . $object . ' for user ' . $uid . ' does already exist.', Logger::DEBUG);
+                       Logger::info('Follow for ' . $object . ' for user ' . $uid . ' does already exist.');
                        return false;
                }
 
@@ -1986,7 +1986,7 @@ class Transmitter
                        'instrument' => self::getService(),
                        'to' => [$profile['url']]];
 
-               Logger::log('Sending follow ' . $object . ' to ' . $target . ' for user ' . $uid, Logger::DEBUG);
+               Logger::info('Sending follow ' . $object . ' to ' . $target . ' for user ' . $uid);
 
                $signed = LDSignature::sign($data, $owner);
                return HTTPSignature::transmit($signed, $profile['inbox'], $uid);
@@ -2103,7 +2103,7 @@ class Transmitter
                        'instrument' => self::getService(),
                        'to' => [$profile['url']]];
 
-               Logger::log('Sending undo to ' . $target . ' for user ' . $uid . ' with id ' . $id, Logger::DEBUG);
+               Logger::info('Sending undo to ' . $target . ' for user ' . $uid . ' with id ' . $id);
 
                $signed = LDSignature::sign($data, $owner);
                return HTTPSignature::transmit($signed, $profile['inbox'], $uid);