Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/message-star/client/views/starredMessages.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>{{_ "No_starred_messages"}}</h2>
<ul class="list clearfix">
{{# with messageContext}}
{{#each msg in messages}}
{{>message msg=msg room=room groupable=true subscription=subscription settings=settings u=u}}
{{>message msg=(populateMessage msg) room=room groupable=false subscription=subscription settings=settings u=u}}
{{/each}}
{{/with}}
</ul>
Expand Down
3 changes: 3 additions & 0 deletions app/message-star/client/views/starredMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Template.starredMessages.helpers({
const instance = Template.instance();
return instance.messages.find({}, { limit: instance.limit.get(), sort: { ts: -1 } });
},
populateMessage(msg) {
return { ...msg, actionContext: 'starred' };
},
hasMore() {
return Template.instance().hasMore.get();
},
Expand Down
3 changes: 3 additions & 0 deletions app/ui-message/client/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Template.message.helpers({
},
timestamp() {
const { msg } = this;
if (typeof msg.ts === 'string') {
return +new Date(msg.ts);
}
return +msg.ts;
},
chatops() {
Expand Down