diff options
author | Mario <mario@mariovavti.com> | 2020-10-06 08:25:53 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-10-06 08:25:53 +0000 |
commit | b37c8bf9287efd3ae810560be356ba96848a2573 (patch) | |
tree | c094f9a8048992309d11e8075bdb0764c5b9c444 /Zotlabs/Lib/ActivityStreams.php | |
parent | 923ae14c471221fb3b199894a153eb136c477b65 (diff) | |
download | volse-hubzilla-b37c8bf9287efd3ae810560be356ba96848a2573.tar.gz volse-hubzilla-b37c8bf9287efd3ae810560be356ba96848a2573.tar.bz2 volse-hubzilla-b37c8bf9287efd3ae810560be356ba96848a2573.zip |
code optimisation
Diffstat (limited to 'Zotlabs/Lib/ActivityStreams.php')
-rw-r--r-- | Zotlabs/Lib/ActivityStreams.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php index b1ef59364..a0ba52aa6 100644 --- a/Zotlabs/Lib/ActivityStreams.php +++ b/Zotlabs/Lib/ActivityStreams.php @@ -274,12 +274,19 @@ class ActivityStreams { return self::fetch($url); } - static function fetch($url,$channel = null) { - return Activity::fetch($url,$channel); + static function fetch($url, $channel = null) { + return Activity::fetch($url, $channel); } static function is_an_actor($s) { - return(in_array($s,[ 'Application','Group','Organization','Person','Service' ])); + return (in_array($s, [ 'Application','Group','Organization','Person','Service' ])); + } + + static function is_response_activity($s) { + if (! $s) { + return false; + } + return (in_array($s, [ 'Like', 'Dislike', 'Flag', 'Block', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'TentativeReject', 'emojiReaction', 'EmojiReaction', 'EmojiReact' ])); } /** @@ -402,7 +409,6 @@ class ActivityStreams { return $x; } - static function is_as_request() { $x = getBestSupportedMimeType([ @@ -415,5 +421,4 @@ class ActivityStreams { } - } |