Bugfix. List of messages need to be passed to api.alert.show

This commit is contained in:
JC Brand 2019-08-07 12:19:53 +02:00
parent 11d8450577
commit 3dc2b2b695
3 changed files with 8 additions and 6 deletions

View File

@ -75,7 +75,7 @@ converse.plugins.add('converse-modal', {
Object.assign(_converse.api, {
'alert': {
'show' (type, title, messages) {
show (type, title, messages) {
if (_.isString(messages)) {
messages = [messages];
}

View File

@ -107,9 +107,10 @@ converse.plugins.add('converse-profile', {
_converse.log(err, Strophe.LogLevel.FATAL);
_converse.api.alert.show(
Strophe.LogLevel.ERROR,
__('Error'),
[__("Sorry, an error happened while trying to save your profile data."),
__("You can check your browser's developer console for any error output.")]
__('Error'), [
__("Sorry, an error happened while trying to save your profile data."),
__("You can check your browser's developer console for any error output.")
]
)
});
this.modal.hide();

View File

@ -509,8 +509,9 @@ converse.plugins.add('converse-rosterview', {
_converse.log(e, Strophe.LogLevel.ERROR);
_converse.api.alert.show(
Strophe.LogLevel.ERROR,
__('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.getDisplayName())
);
__('Error'),
[__('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.getDisplayName())]
)
}
},