Remove incorrect comments
- activeChannelClaim is the comment creator, not receiver. - doSeeNotifications marks a notification as "seen", and not "send a notification". - Removed comments that are just explaining the syntax.
This commit is contained in:
parent
ac93e0c22c
commit
8507d07d3e
1 changed files with 5 additions and 10 deletions
|
@ -549,8 +549,8 @@ export function doCommentReact(commentId: string, type: string) {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param comment
|
* @param comment
|
||||||
* @param claim_id - File claim id
|
* @param claim_id The ID of the claim to create the comment on. Can be a file, livestream, or channel page.
|
||||||
* @param parent_id - What is this?
|
* @param parent_id
|
||||||
* @param uri
|
* @param uri
|
||||||
* @param livestream
|
* @param livestream
|
||||||
* @param sticker
|
* @param sticker
|
||||||
|
@ -572,8 +572,6 @@ export function doCommentCreate(
|
||||||
) {
|
) {
|
||||||
return async (dispatch: Dispatch, getState: GetState) => {
|
return async (dispatch: Dispatch, getState: GetState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
||||||
// get active channel that will receive comment and optional tip
|
|
||||||
const activeChannelClaim = selectActiveChannelClaim(state);
|
const activeChannelClaim = selectActiveChannelClaim(state);
|
||||||
|
|
||||||
if (!activeChannelClaim) {
|
if (!activeChannelClaim) {
|
||||||
|
@ -593,7 +591,6 @@ export function doCommentCreate(
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// send a notification
|
|
||||||
const notification = parent_id && makeSelectNotificationForCommentId(parent_id)(state);
|
const notification = parent_id && makeSelectNotificationForCommentId(parent_id)(state);
|
||||||
if (notification && !notification.is_seen) dispatch(doSeeNotifications([notification.id]));
|
if (notification && !notification.is_seen) dispatch(doSeeNotifications([notification.id]));
|
||||||
|
|
||||||
|
@ -601,8 +598,6 @@ export function doCommentCreate(
|
||||||
return dispatch(doToast({ isError: true, message: __('Unable to verify your channel. Please try again.') }));
|
return dispatch(doToast({ isError: true, message: __('Unable to verify your channel. Please try again.') }));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comments is a function which helps make calls to the backend
|
|
||||||
// these params passed in POST call.
|
|
||||||
return Comments.comment_create({
|
return Comments.comment_create({
|
||||||
comment: comment,
|
comment: comment,
|
||||||
claim_id: claim_id,
|
claim_id: claim_id,
|
||||||
|
@ -612,9 +607,9 @@ export function doCommentCreate(
|
||||||
signature: signatureData.signature,
|
signature: signatureData.signature,
|
||||||
signing_ts: signatureData.signing_ts,
|
signing_ts: signatureData.signing_ts,
|
||||||
sticker: sticker,
|
sticker: sticker,
|
||||||
...(txid ? { support_tx_id: txid } : {}), // add transaction id if it exists
|
...(txid ? { support_tx_id: txid } : {}),
|
||||||
...(payment_intent_id ? { payment_intent_id } : {}), // add payment_intent_id if it exists
|
...(payment_intent_id ? { payment_intent_id } : {}),
|
||||||
...(environment ? { environment } : {}), // add environment for stripe if it exists
|
...(environment ? { environment } : {}),
|
||||||
})
|
})
|
||||||
.then((result: CommentCreateResponse) => {
|
.then((result: CommentCreateResponse) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
Loading…
Reference in a new issue