]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Conversations now have URIs that are not URLs
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 1 May 2014 13:47:51 +0000 (15:47 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 1 May 2014 18:17:40 +0000 (20:17 +0200)
classes/Conversation.php

index 033b99384b0470f10c7e46d72bd37331eab79b5a..faca20f9c6e515bef0a2549da243f791def6eb9b 100755 (executable)
@@ -56,7 +56,10 @@ class Conversation extends Managed_DataObject
     }
 
     /**
-     * Factory method for creating a new conversation
+     * Factory method for creating a new conversation.
+     *
+     * Use this for locally initiated conversations. Remote notices should
+     * preferrably supply their own conversation URIs in the OStatus feed.
      *
      * @return Conversation the new conversation DO
      */
@@ -68,7 +71,10 @@ class Conversation extends Managed_DataObject
         $conv = new Conversation();
         $conv->created = common_sql_now();
         $conv->id = $notice->id;
-        $conv->uri = common_local_url('conversation', array('id' => $notice->id), null, null, false);
+        $conv->uri = sprintf('%s%s=%d:%s=%s',
+                             TagURI::mint(),
+                             'noticeId', $notice->id,
+                             'objectType', 'thread');
         $result = $conv->insert();
 
         if ($result === false) {