Skip to content

Commit

Permalink
whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiAurori committed Oct 31, 2021
1 parent a35f2a1 commit 89fe68d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MessageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Messages extends React.Component {
if (newMessages.length >= (!this.state.bottomOfPage ? 150 : 50)) {
newMessages = newMessages.slice(newMessages.length - 50, newMessages.length)
}
let grouped = (newMessages[0].message.author?._id == message.author?._id) && !(message.reply_ids && message.reply_ids.length > 0)
let grouped = newMessages.length > 0 && ((newMessages[newMessages.length - 1].message?.author?._id == message.author?._id) && !(message.reply_ids && message.reply_ids.length > 0) && (dayjs(decodeTime(message._id)).diff(dayjs(decodeTime(newMessages[newMessages.length - 1].message?._id)), "minute") < 5))
newMessages.push({message, grouped, rendered: this.renderMessage({grouped, message})})
return {messages: newMessages, newMessageCount: !this.state.bottomOfPage ? (this.state.newMessageCount + 1) || 1 : 0}
})
Expand Down

0 comments on commit 89fe68d

Please sign in to comment.