I’m trying to create a blockquote-like style for the chat reply and I have it working for the chat message but not for the chat-composer-message-details.hbs.
This is chat-composer-message-details.hbs
:
<div class="chat-composer-message-details">
<div class="tc-reply-display">
{{d-icon icon}}
{{chat-user-avatar user=message.user}}
<span class="tc-reply-username">{{message.user.username}}</span>
<span class="tc-reply-msg">{{replace-emoji message.excerpt}}</span>
</div>
{{flat-button
action=action
class="cancel-message-action"
icon="times-circle"
title=title
}}
</div>
And I’m trying to add this into it by overriding the template:
<span class="tc-reply-msg">
{{#if message.uploads.length}}
<span class="tc-reply-uploads-icon">
{{d-icon "camera"}}
</span>
{{/if}}
{{#if message.cooked}}
{{replace-emoji message.cooked}}
{{else}}
Photo
{{/if}}
</span>
And yet neither the message.cooked
nor the message.uploads.length
seems to find anything, even if the message to which I’m replying has text and/or an upload. When I put message.excerpt
instead of message.cooked
, the text shows, but only an excerpt of it and I’d like to see the full text.
I’m not sure how to debug the JSON object, if I put {{message}}
it just shows [object Object]
.
Any ideas what might be happening or how I can better debug it?