]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/rssaction.php
don't hide unsub button for remote users
[quix0rs-gnu-social.git] / lib / rssaction.php
index 6f30a02f2195ce2840342a136cdb0c6a00c7f391..0c8188e88021a8aca153d0eefb09ecf2b5805861 100644 (file)
@@ -170,7 +170,7 @@ class Rss10Action extends Action
         $this->elementStart('rdf:Seq');
 
         foreach ($this->notices as $notice) {
-            $this->element('sioct:MicroblogPost', array('rdf:resource' => $notice->uri));
+            $this->element('rdf:li', array('rdf:resource' => $notice->uri));
         }
 
         $this->elementEnd('rdf:Seq');
@@ -197,7 +197,8 @@ class Rss10Action extends Action
         $profile = Profile::staticGet($notice->profile_id);
         $nurl = common_local_url('shownotice', array('notice' => $notice->id));
         $creator_uri = common_profile_uri($profile);
-        $this->elementStart('item', array('rdf:about' => $notice->uri));
+        $this->elementStart('item', array('rdf:about' => $notice->uri,
+                            'rdf:type' => 'http://rdfs.org/sioc/types#MicroblogPost'));
         $title = $profile->nickname . ': ' . common_xml_safe_str(trim($notice->content));
         $this->element('title', null, $title);
         $this->element('link', null, $nurl);
@@ -207,9 +208,14 @@ class Rss10Action extends Action
         }
         $this->element('dc:date', null, common_date_w3dtf($notice->created));
         $this->element('dc:creator', null, ($profile->fullname) ? $profile->fullname : $profile->nickname);
-        $this->element('sioc:has_creator', array('rdf:resource' => $creator_uri));
+        $this->element('foaf:maker', array('rdf:resource' => $creator_uri));
+        $this->element('sioc:has_creator', array('rdf:resource' => $creator_uri.'#acct'));
         $this->element('laconica:postIcon', array('rdf:resource' => $profile->avatarUrl()));
         $this->element('cc:licence', array('rdf:resource' => common_config('license', 'url')));
+        if ($notice->reply_to) {
+            $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to));
+            $this->element('sioc:reply_of', array('rdf:resource' => $replyurl));
+        }
         $this->elementEnd('item');
         $this->creators[$creator_uri] = $profile;
     }
@@ -219,15 +225,15 @@ class Rss10Action extends Action
         foreach ($this->creators as $uri => $profile) {
             $id = $profile->id;
             $nickname = $profile->nickname;
-            $this->elementStart('sioc:User', array('rdf:about' => $uri));
+            $this->elementStart('foaf:Agent', array('rdf:about' => $uri));
             $this->element('foaf:nick', null, $nickname);
             if ($profile->fullname) {
                 $this->element('foaf:name', null, $profile->fullname);
             }
-            $this->element('sioc:id', null, $id);
+            $this->element('foaf:holdsAccount', array('rdf:resource' => $uri.'#acct'));
             $avatar = $profile->avatarUrl();
-            $this->element('sioc:avatar', array('rdf:resource' => $avatar));
-            $this->elementEnd('sioc:User');
+            $this->element('foaf:depiction', array('rdf:resource' => $avatar));
+            $this->elementEnd('foaf:Agent');
         }
     }