mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-22 05:15:19 +00:00
Merge branch 'dev'
This commit is contained in:
commit
d6841635ff
2 changed files with 6 additions and 5 deletions
|
@ -1182,7 +1182,7 @@ class Activity {
|
|||
|
||||
// sort function width decreasing
|
||||
|
||||
static function as_vid_sort($a,$b) {
|
||||
static function vid_sort($a,$b) {
|
||||
if($a['width'] === $b['width'])
|
||||
return 0;
|
||||
return (($a['width'] > $b['width']) ? -1 : 1);
|
||||
|
@ -1348,7 +1348,7 @@ class Activity {
|
|||
}
|
||||
}
|
||||
if($mps) {
|
||||
usort($mps,'as_vid_sort');
|
||||
usort($mps,[ __CLASS__, 'vid_sort' ]);
|
||||
foreach($mps as $m) {
|
||||
if(intval($m['width']) < 500) {
|
||||
$s['body'] .= "\n\n" . '[video]' . $m['href'] . '[/video]';
|
||||
|
@ -1551,7 +1551,7 @@ class Activity {
|
|||
}
|
||||
}
|
||||
if($mps) {
|
||||
usort($mps,'as_vid_sort');
|
||||
usort($mps,[ __CLASS__, 'vid_sort' ]);
|
||||
foreach($mps as $m) {
|
||||
if(intval($m['width']) < 500) {
|
||||
$s['body'] .= "\n\n" . '[video]' . $m['href'] . '[/video]';
|
||||
|
|
|
@ -4,6 +4,7 @@ use Zotlabs\Lib\Libzot;
|
|||
use Zotlabs\Lib\Zotfinger;
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\Activity;
|
||||
use Zotlabs\Lib\ActivityPub;
|
||||
|
||||
/**
|
||||
* @file include/network.php
|
||||
|
@ -1222,8 +1223,8 @@ function discover_by_webbie($webbie, $protocol = '') {
|
|||
}
|
||||
}
|
||||
|
||||
if(strpos($url,'http') === 0) {
|
||||
$ap = ActivityPub::discover($link['href']);
|
||||
if(strpos($webbie,'http') === 0) {
|
||||
$ap = ActivityPub::discover($webbie);
|
||||
if($ap) {
|
||||
return $ap;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue