if (this.parentComment) {
const mentions = this.parentComments
- .filter(c => c.account.id !== this.user.account.id) // Don't add mention of ourselves
+ .filter(c => c.account && c.account.id !== this.user.account.id) // Don't add mention of ourselves
.map(c => '@' + c.by)
const mentionsSet = new Set(mentions)
const html = await this.markdownService.textMarkdownToHTML(this.comment.text, true)
this.sanitizedCommentHTML = await this.markdownService.processVideoTimestamps(html)
this.newParentComments = this.parentComments.concat([ this.comment ])
- this.commentAccount = new Account(this.comment.account)
- this.getUserIfNeeded(this.commentAccount)
+
+ if (this.comment.account) {
+ this.commentAccount = new Account(this.comment.account)
+ this.getUserIfNeeded(this.commentAccount)
+ } else {
+ this.comment.account = null
+ }
}
}
// Mark the comment as deleted
this.softDeleteComment(commentToDelete)
- if (this.highlightedThread.id === commentToDelete.id) this.highlightedThread = undefined
+ if (this.highlightedThread?.id === commentToDelete.id) this.highlightedThread = undefined
},
err => this.notifier.error(err.message)
// Send to actors we reply to
for (const parentComment of threadParentComments) {
+ if (parentComment.isDeleted()) continue
+
cc.push(parentComment.Account.Actor.url)
}
// Add the actor that commented too
actorsInvolvedInComment.push(byActor)
- const parentsCommentActors = threadParentComments.map(c => c.Account.Actor)
+ const parentsCommentActors = threadParentComments.filter(c => !c.isDeleted())
+ .map(c => c.Account.Actor)
let audience: ActivityAudience
if (isOrigin) {