3

I am testing a feed that consists of comments posted by selected users. When the feed is used in a chatroom, some items get posted as intended, with the author and text of the comment:

comment

Others become just a onebox of the post under which the comment appeared, disregarding the <summary> field of the item, which contains the text of the comment:

onebox

What makes the difference? The structure of two items is exactly the same.

First example:

<entry>
<id>http://meta.stackexchange.com/questions/2874042016-11-26T18:45:36Z</id>
<title type="html">We&#39;re enabling display ads on select Stack Exchange sites</title>
<author><name>Tim Post</name></author>
<link rel="alternate" href="http://meta.stackexchange.com/questions/287404" />
<published>2016-11-26T18:45:36Z</published>
<summary type="html">Tim Post: Oh and, we never accept investments from people that want to tell us what to do. We&#39;re entirely autonomous, and we have very, very patient investors :)</summary>
</entry> 

Second example:

<entry>
<id>http://meta.stackexchange.com/questions/2874072016-11-26T18:07:45Z</id>
<title type="html">Can we stop counting link text in comment word-counts?</title>
<author><name>animuson</name></author>
<link rel="alternate" href="http://meta.stackexchange.com/questions/287407" />
<published>2016-11-26T18:07:45Z</published>
<summary type="html">animuson:  as 600 characters in the database. That was just pretty poor wording on Jeff&#39;s part.</summary>
</entry>
5

The difference is that one has a QUESTIONS link that points to a question

<link rel="alternate" href="http://meta.stackexchange.com/questions/287407" />

while the other one

<link rel="alternate" href="http://meta.stackexchange.com/questions/287404" />

uses a QUESTIONS link that points to an answer. Proper answer links that DO one-box need to be of the form http://meta.stackexchange.com/a/287420

That fact makes that the answer doesn't one-box in chat, so server-side the summary of the feed is used as text to post. For question links the one-box processing kicks in, happily ignoring the summary from the feed.

If you can change the question link to a format that doesn't one-box, like adding am extra / at the end, you'll also get the summary from the feed in those cases.

You must log in to answer this question.