mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 21:32:51 +00:00
Preserve raw video author pubkeys for comment threads
This commit is contained in:
1 parent
b7d63f235c
commit
8258686f55
2 files changed
+152
-15
No files matched your search
@@ -193,7 +193,7 @@ export default class CommentThreadService {
|
||||
if (this.videoKind) {
|
||||
target.videoKind = this.videoKind;
|
||||
}
|
||||
const targetVideoAuthorPubkey = this.videoAuthorPubkeyRaw || this.videoAuthorPubkey;
|
||||
const targetVideoAuthorPubkey = this.getVideoAuthorPubkeyForOutput();
|
||||
if (targetVideoAuthorPubkey) {
|
||||
target.videoAuthorPubkey = targetVideoAuthorPubkey;
|
||||
}
|
||||
@@ -738,14 +738,17 @@ export default class CommentThreadService {
|
||||
await hydrationPromise;
|
||||
}
|
||||
|
||||
getVideoAuthorPubkeyForOutput() {
|
||||
return this.videoAuthorPubkeyRaw || this.videoAuthorPubkey || "";
|
||||
}
|
||||
|
||||
emitThreadReady() {
|
||||
const payload = {
|
||||
videoEventId: this.videoEventId,
|
||||
parentCommentId: this.parentCommentId || null,
|
||||
videoDefinitionAddress: this.videoAddressPointer || null,
|
||||
videoKind: this.videoKind || null,
|
||||
videoAuthorPubkey:
|
||||
this.videoAuthorPubkeyRaw || this.videoAuthorPubkey || null,
|
||||
videoAuthorPubkey: this.getVideoAuthorPubkeyForOutput() || null,
|
||||
parentCommentKind: this.parentCommentKind || null,
|
||||
parentCommentPubkey: this.parentCommentPubkey || null,
|
||||
topLevelIds: this.getCommentIdsForParent(null),
|
||||
@@ -763,8 +766,7 @@ export default class CommentThreadService {
|
||||
parentCommentId: parentId || null,
|
||||
videoDefinitionAddress: this.videoAddressPointer || null,
|
||||
videoKind: this.videoKind || null,
|
||||
videoAuthorPubkey:
|
||||
this.videoAuthorPubkeyRaw || this.videoAuthorPubkey || null,
|
||||
videoAuthorPubkey: this.getVideoAuthorPubkeyForOutput() || null,
|
||||
parentCommentKind: this.parentCommentKind || null,
|
||||
parentCommentPubkey: this.parentCommentPubkey || null,
|
||||
commentIds: [eventId],
|
||||
@@ -789,8 +791,7 @@ export default class CommentThreadService {
|
||||
parentCommentId: this.parentCommentId || null,
|
||||
videoDefinitionAddress: this.videoAddressPointer || null,
|
||||
videoKind: this.videoKind || null,
|
||||
videoAuthorPubkey:
|
||||
this.videoAuthorPubkeyRaw || this.videoAuthorPubkey || null,
|
||||
videoAuthorPubkey: this.getVideoAuthorPubkeyForOutput() || null,
|
||||
parentCommentKind: this.parentCommentKind || null,
|
||||
parentCommentPubkey: this.parentCommentPubkey || null,
|
||||
commentsById: this.cloneCommentsMap(),
|
||||
|
||||
Reference in new issue
Block a user