dcc66f211e
## Issue 1075, spam prevention. ## Approach - When making a reaction, fetch reactions for all my channels for the particular comment id, and reject the reaction is any was found. - Report the channel name in the toast so that user can at least know which channel to select in order to undo the reaction.
19 lines
517 B
JavaScript
19 lines
517 B
JavaScript
// @flow
|
|
import { doToast } from 'redux/actions/notifications';
|
|
|
|
export function doFailedSignatureToast(dispatch: Dispatch, channelName: string) {
|
|
dispatch(
|
|
doToast({
|
|
message: __('Unable to verify signature.'),
|
|
subMessage: channelName,
|
|
isError: true,
|
|
})
|
|
);
|
|
}
|
|
|
|
export function devToast(dispatch: Dispatch, msg: string) {
|
|
// @if process.env.NODE_ENV!='production'
|
|
console.error(msg); // eslint-disable-line
|
|
dispatch(doToast({ isError: true, message: `DEV: ${msg}` }));
|
|
// @endif
|
|
}
|