]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/OStatusPlugin.php
OStatus: record source profile & saving method in ostatus_source table; this allows...
[quix0rs-gnu-social.git] / plugins / OStatus / OStatusPlugin.php
index 304cf14aef9727b6f4e6066af1512f8e35c0ddac..5b9e3be2bccfd0f9583024a1d70b5dcfb05bd6e6 100644 (file)
@@ -199,16 +199,16 @@ class OStatusPlugin extends Plugin
     {
         $mentioned = $notice->getReplies();
 
-        foreach ($mentioned as $profile) {
+        foreach ($mentioned as $profile_id) {
 
-            $oprofile = Ostatus_profile::staticGet('profile_id', $profile->id);
+            $oprofile = Ostatus_profile::staticGet('profile_id', $profile_id);
 
             if (!empty($oprofile) && !empty($oprofile->salmonuri)) {
 
                 // FIXME: this needs to go out in a queue handler
 
                 $xml = '<?xml version="1.0" encoding="UTF-8" ?>';
-                $xml .= $notice->asAtomEntry();
+                $xml .= $notice->asAtomEntry(true, true);
 
                 $salmon = new Salmon();
                 $salmon->post($oprofile->salmonuri, $xml);
@@ -305,6 +305,7 @@ class OStatusPlugin extends Plugin
     function onCheckSchema() {
         $schema = Schema::get();
         $schema->ensureTable('ostatus_profile', Ostatus_profile::schemaDef());
+        $schema->ensureTable('ostatus_source', Ostatus_source::schemaDef());
         $schema->ensureTable('feedsub', FeedSub::schemaDef());
         $schema->ensureTable('hubsub', HubSub::schemaDef());
         return true;