Browse Source

include `quotation-of` property for quoted tweets

pull/64/head
Aaron Parecki 3 years ago
parent
commit
452accf6bf
No known key found for this signature in database GPG Key ID: 276C2817346D6056
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      lib/XRay/Formats/Twitter.php
  2. +1
    -0
      tests/TwitterTest.php

+ 1
- 0
lib/XRay/Formats/Twitter.php View File

@ -175,6 +175,7 @@ class Twitter extends Format {
}
}
$refs[$quoteOf] = $quotedEntry['data'];
$entry['quotation-of'] = $quoteOf;
}
if($author = self::_buildHCardFromTwitterProfile($tweet->user)) {

+ 1
- 0
tests/TwitterTest.php View File

@ -169,6 +169,7 @@ class TwitterTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('entry', $data['data']['type']);
$this->assertEquals('Quoted tweet with a #hashtag https://twitter.com/aaronpk/status/817414679131660288', $data['data']['content']['text']);
$this->assertEquals('https://twitter.com/aaronpk/status/817414679131660288', $data['data']['quotation-of']);
$tweet = $data['data']['refs']['https://twitter.com/aaronpk/status/817414679131660288'];
$this->assertEquals('Yeah that\'s me http://xkcd.com/1782/', $tweet['content']['text']);
}

Loading…
Cancel
Save