mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Merge pull request #143 from matrix-org/dbkr/fix_display_name_prompt_when_peeking
Filter rooms by ones we're in: getRooms() is not the set of rooms we are joined.
This commit is contained in:
commit
a2e50eb496
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
|
||||
// it doesn't behave quite as desired here (we want an input field here rather than
|
||||
// content-editable, and we want a default).
|
||||
if (MatrixClientPeg.get().getRooms().length == 0) {
|
||||
if (cli.getRooms().filter((r) => {
|
||||
return r.hasMembershipState(cli.credentials.userId, "join");
|
||||
})) {
|
||||
display_name_promise = cli.getProfileInfo(cli.credentials.userId).then((result) => {
|
||||
if (!result.displayname) {
|
||||
var SetDisplayNameDialog = sdk.getComponent('views.dialogs.SetDisplayNameDialog');
|
||||
|
|
Loading…
Reference in a new issue