We don't show the "in context" link unless notice.id != notice.conversation. The conversation ID is always the notice ID of the first notice in the conversation, so "in context" only shows up on notices that are replies to others.

That filters out single-notice conversations, at the expense of not showing the link on the first notice in a multi-notice conversation.

It would probably make sense to do this:

   if ($notice->id != $notice->conversation ||
       Notice::conversationStream($notice->id, 1, 1)->N > 0) {
       // show context link
   }

Here, we're getting a "stream" of the notices in the conversation starting with the second notice -- and only one notice long. It should properly hit memcached and be fairly efficient.

-Evan

--
Evan Prodromou
CEO, StatusNet, Inc.
[email protected] - http://identi.ca/evan - +1-514-554-3826

_______________________________________________
StatusNet-dev mailing list
[email protected]
http://lists.status.net/mailman/listinfo/statusnet-dev

Reply via email to