only create 1 alert for chat spam error

This commit is contained in:
barisusakli
2017-03-08 22:43:02 +03:00
parent 32d37465fb
commit f092b7754e

View File

@@ -35,7 +35,14 @@ define('forum/chats/messages', ['components', 'sounds', 'translator'], function
if (err.message === '[[error:email-not-confirmed-chat]]') {
return app.showEmailConfirmWarning(err);
}
return app.alertError(err.message);
return app.alert({
alert_id: 'chat_spam_error',
title: '[[global:alert.error]]',
message: err.message,
type: 'danger',
timeout: 10000,
});
}
sounds.play('chat-outgoing');