Filter rooms by ones we're in: getRooms() is not the set of rooms we are joined.
Fixes https://github.com/vector-im/vector-web/issues/885
This commit is contained in:
parent
05f1e1e205
commit
baba500150
1 changed files with 3 additions and 1 deletions
|
@ -714,7 +714,9 @@ module.exports = React.createClass({
|
||||||
// NB. This unfortunately does not re-use the ChangeDisplayName component because
|
// NB. This unfortunately does not re-use the ChangeDisplayName component because
|
||||||
// it doesn't behave quite as desired here (we want an input field here rather than
|
// it doesn't behave quite as desired here (we want an input field here rather than
|
||||||
// content-editable, and we want a default).
|
// content-editable, and we want a default).
|
||||||
if (MatrixClientPeg.get().getRooms().length == 0) {
|
if (cli.getRooms().filter((r) => {
|
||||||
|
return !!r.getMember(cli.credentials.userId);
|
||||||
|
}).length == 0) {
|
||||||
display_name_promise = cli.getProfileInfo(cli.credentials.userId).then((result) => {
|
display_name_promise = cli.getProfileInfo(cli.credentials.userId).then((result) => {
|
||||||
if (!result.displayname) {
|
if (!result.displayname) {
|
||||||
var SetDisplayNameDialog = sdk.getComponent('views.dialogs.SetDisplayNameDialog');
|
var SetDisplayNameDialog = sdk.getComponent('views.dialogs.SetDisplayNameDialog');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue