Browse Source

check for AS mediaType key

closes #104
pull/108/head
Aaron Parecki 2 years ago
parent
commit
9ec333255c
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lib/XRay/Formats/ActivityStreams.php

+ 3
- 0
lib/XRay/Formats/ActivityStreams.php View File

@ -132,6 +132,9 @@ class ActivityStreams extends Format {
$photos = [];
$videos = [];
foreach($as2['attachment'] as $attachment) {
if(!isset($attachment['mediaType'])) {
continue;
}
if(strpos($attachment['mediaType'], 'image/') !== false) {
$photos[] = $attachment['url'];
}

Loading…
Cancel
Save