diff --git a/flow-typed/Comment.js b/flow-typed/Comment.js index 2a1856570..ba945227c 100644 --- a/flow-typed/Comment.js +++ b/flow-typed/Comment.js @@ -176,6 +176,11 @@ declare type CommentAbandonParams = { mod_channel_name?: string, }; +declare type MentionedChannel = { + channel_name: string, + channel_id: string, +}; + declare type CommentCreateParams = { comment: string, claim_id: string, @@ -183,6 +188,7 @@ declare type CommentCreateParams = { signature: string, signing_ts: string, support_tx_id?: string, + mentioned_channels?: Array, }; declare type SuperListParams = {}; diff --git a/ui/redux/actions/comments.js b/ui/redux/actions/comments.js index 573919ac3..8b006da2e 100644 --- a/ui/redux/actions/comments.js +++ b/ui/redux/actions/comments.js @@ -29,11 +29,6 @@ const PROMISE_FULFILLED = 'fulfilled'; const MENTION_REGEX = /(?:^| |\n)@[^\s=&#$@%?:;/"<>%{}|^~[]*(?::[\w]+)?/gm; -declare type MentionedChannel = { - channelName: string, - channelID: string, -}; - function devToast(dispatch, msg) { if (isDev) { console.error(msg); // eslint-disable-line @@ -521,10 +516,10 @@ export function doCommentCreate( const claim = selectClaimForUri(state, mentionUri); if (claim) { - mentionedChannels.push({ channelName: claim.name, channelID: claim.claim_id }); + mentionedChannels.push({ channel_name: claim.name, channel_id: claim.claim_id }); } else if (claim === undefined) { dispatch(doResolveUri(mentionUri)) - .then((response) => mentionedChannels.push({ channelName: response.name, channelID: response.claim_id })) + .then((response) => mentionedChannels.push({ channel_name: response.name, channel_id: response.claim_id })) .catch((e) => {}); } });