2020-08-24 19:35:21 +02:00
|
|
|
declare type Comment = {
|
|
|
|
comment: string, // comment body
|
|
|
|
comment_id: string, // sha256 digest
|
|
|
|
claim_id: string, // id linking to the claim this comment
|
|
|
|
timestamp: number, // integer representing unix-time
|
|
|
|
is_hidden: boolean, // claim owner may enable/disable this
|
2020-10-07 22:18:16 +02:00
|
|
|
channel_id: string, // claimId of channel signing this comment
|
|
|
|
channel_name?: string, // name of channel claim
|
2020-08-24 19:35:21 +02:00
|
|
|
channel_url?: string, // full lbry url to signing channel
|
|
|
|
signature?: string, // signature of comment by originating channel
|
|
|
|
signing_ts?: string, // timestamp used when signing this comment
|
|
|
|
is_channel_signature_valid?: boolean, // whether or not the signature could be validated
|
|
|
|
parent_id?: number, // comment_id of comment this is in reply to
|
2020-10-08 17:31:36 +02:00
|
|
|
is_pinned: boolean,
|
2020-08-24 19:35:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// todo: relate individual comments to their commentId
|
|
|
|
declare type CommentsState = {
|
|
|
|
commentsByUri: { [string]: string },
|
|
|
|
byId: { [string]: Array<string> },
|
|
|
|
repliesByParentId: { [string]: Array<string> }, // ParentCommentID -> list of reply comments
|
|
|
|
topLevelCommentsById: { [string]: Array<string> }, // ClaimID -> list of top level comments
|
|
|
|
commentById: { [string]: Comment },
|
|
|
|
isLoading: boolean,
|
|
|
|
myComments: ?Set<string>,
|
2020-09-29 16:10:23 +02:00
|
|
|
isFetchingReacts: boolean,
|
|
|
|
myReactsByCommentId: any,
|
|
|
|
othersReactsByCommentId: any,
|
2020-09-30 17:59:05 +02:00
|
|
|
pendingCommentReactions: Array<string>,
|
2021-03-03 19:50:16 +01:00
|
|
|
moderationBlockList: ?Array<string>,
|
|
|
|
fetchingModerationBlockList: boolean,
|
|
|
|
blockingByUri: {},
|
|
|
|
unBlockingByUri: {},
|
2020-08-24 19:35:21 +02:00
|
|
|
};
|
2020-09-29 16:10:23 +02:00
|
|
|
|
|
|
|
declare type CommentReactParams = {
|
|
|
|
comment_ids: string,
|
|
|
|
channel_name: string,
|
|
|
|
channel_id: string,
|
|
|
|
react_type: string,
|
|
|
|
clear_types?: string,
|
|
|
|
remove?: boolean,
|
2020-10-07 22:18:16 +02:00
|
|
|
};
|