Fixes #144. Fall back to JID if name is not available

This commit is contained in:
JC Brand 2019-03-28 15:35:37 +01:00
parent 34b8cd2ee6
commit d300be58cc
4 changed files with 5 additions and 4 deletions

View File

@ -30,6 +30,7 @@
- #1467: Fix rendering of URLs enclosed with sharp brackets such as <https://example.org> - #1467: Fix rendering of URLs enclosed with sharp brackets such as <https://example.org>
- #1479: Allow file upload by drag & drop also in MUCs - #1479: Allow file upload by drag & drop also in MUCs
- #1487: New config option [muc_respect_autojoin](https://conversejs.org/docs/html/configuration.html#muc-respect-autojoin) - #1487: New config option [muc_respect_autojoin](https://conversejs.org/docs/html/configuration.html#muc-respect-autojoin)
- #1488: In error message, fall back to JID if name is not available.
- #1501: Don't prompt for a reason if [auto_join_on_invite](https://conversejs.org/docs/html/configuration.html#auto-join-on-invite) is `true` - #1501: Don't prompt for a reason if [auto_join_on_invite](https://conversejs.org/docs/html/configuration.html#auto-join-on-invite) is `true`
- #1507: Make message id and origin-id identical in order to fix LMC with Conversations - #1507: Make message id and origin-id identical in order to fix LMC with Conversations
- #1508: Minimized bookmarked chatboxes should not be always maximized after page reload. - #1508: Minimized bookmarked chatboxes should not be always maximized after page reload.

4
dist/converse.js vendored
View File

@ -59548,7 +59548,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins
} catch (e) { } catch (e) {
_converse.log(e, Strophe.LogLevel.ERROR); _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.', name)); _converse.api.alert.show(Strophe.LogLevel.ERROR, __('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.getDisplayName()));
} }
}, },
@ -68687,7 +68687,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
} catch (e) { } catch (e) {
_converse.log(e, Strophe.LogLevel.ERROR); _converse.log(e, Strophe.LogLevel.ERROR);
alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name)); alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name || jid));
return e; return e;
} }

View File

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

View File

@ -478,7 +478,7 @@ converse.plugins.add('converse-roster', {
await this.sendContactAddIQ(jid, name, groups); await this.sendContactAddIQ(jid, name, groups);
} catch (e) { } catch (e) {
_converse.log(e, Strophe.LogLevel.ERROR); _converse.log(e, Strophe.LogLevel.ERROR);
alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name)); alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name || jid));
return e; return e;
} }
return this.create(_.assignIn({ return this.create(_.assignIn({