From 962c592e802cda00a8e745e2c257d6167cf35555 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Wed, 25 Nov 2015 18:26:13 +0100 Subject: [PATCH] unrepeat support for older gnu social versions (i.e. quitter.se) --- QvitterPlugin.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 2283f1b..5fbeba6 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -451,6 +451,15 @@ class QvitterPlugin extends Plugin { } $twitter_status['statusnet_in_groups'] = $group_addressees; + // for older verions of gnu social: include the repeat-id, which we need when unrepeating later + if(array_key_exists('repeated', $twitter_status) && $twitter_status['repeated'] === true) { + $repeated = Notice::pkeyGet(array('profile_id' => $scoped->id, + 'repeat_of' => $notice->id, + 'verb' => 'http://activitystrea.ms/schema/1.0/share')); + $twitter_status['repeated_id'] = $repeated->id; + + } + // more metadata about attachments // get all attachments first, and put all the extra meta data in an array