From 9a5e1423f139be474464d3caf0945c8c736831f5 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 1 May 2014 15:47:51 +0200 Subject: [PATCH] Conversations now have URIs that are not URLs --- classes/Conversation.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/classes/Conversation.php b/classes/Conversation.php index 033b99384b..faca20f9c6 100755 --- a/classes/Conversation.php +++ b/classes/Conversation.php @@ -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) { -- 2.39.5