Browse Source

Allow follow-of

pull/78/head
swentel 5 years ago
parent
commit
73f7b5c755
3 changed files with 6 additions and 1 deletions
  1. +2
    -0
      README.md
  2. +1
    -1
      lib/XRay/Formats/Mf2.php
  3. +3
    -0
      lib/XRay/PostType.php

+ 2
- 0
README.md View File

@ -384,6 +384,7 @@ If a property supports multiple values, it will always be returned as an array.
* `like-of`
* `repost-of`
* `bookmark-of`
* `follow-of`
* `syndication`
* `photo` (of an entry, not of a card)
* `video`
@ -416,6 +417,7 @@ The following post types are returned, which are slightly expanded from what is
* `photo`
* `article`
* `note`
* `follow`
#### Other Properties

+ 1
- 1
lib/XRay/Formats/Mf2.php View File

@ -429,7 +429,7 @@ class Mf2 extends Format {
// These properties are always returned as arrays and always URLs
// If the value is an h-* object with a URL, the URL is used and a "ref" is added as well
self::collectArrayURLValues(['photo','video','audio','syndication','in-reply-to','like-of','repost-of','bookmark-of','quotation-of'], $item, $data, $refs, $http);
self::collectArrayURLValues(['photo','video','audio','syndication','in-reply-to','like-of','repost-of','bookmark-of','quotation-of','follow-of'], $item, $data, $refs, $http);
// Hack to make quotation-of a single value
if(isset($data['quotation-of']))

+ 3
- 0
lib/XRay/PostType.php View File

@ -38,6 +38,9 @@ class PostType {
if(isset($post['photo']))
return 'photo';
if(isset($post['follow-of']))
return 'follow';
$content = '';
if(isset($post['content']))
$content = $post['content']['text'];

Loading…
Cancel
Save