File size: 455 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import { recordTracksEvent } from '../../../helpers/stats';
import { spamNote as spamNoteAction } from '../actions';
import bumpStat from '../utils/bump-stat';
const spamNote = ( note, restClient ) => ( dispatch ) => {
bumpStat( 'spam-comment' );
recordTracksEvent( 'calypso_notification_note_spam', {
note_type: note.type,
} );
dispatch( spamNoteAction( note.id ) );
restClient.global.updateUndoBar( 'spam', note );
};
export default spamNote;
|