Fix room creation error
This commit is contained in:
parent
8d2edfaafe
commit
c31f3c5925
1 changed files with 28 additions and 16 deletions
|
|
@ -66,7 +66,11 @@
|
||||||
<div class="ms-2">{{ data.item.name }}</div>
|
<div class="ms-2">{{ data.item.name }}</div>
|
||||||
</template>
|
</template>
|
||||||
</v-select>
|
</v-select>
|
||||||
<v-checkbox class="mt-0" v-model="sharedComputer" :label="$t('join.shared_computer')" />
|
<v-checkbox
|
||||||
|
class="mt-0"
|
||||||
|
v-model="sharedComputer"
|
||||||
|
:label="$t('join.shared_computer')"
|
||||||
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
|
|
@ -283,6 +287,14 @@ export default {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
sharedComputer: {
|
||||||
|
get: function () {
|
||||||
|
return !this.$store.state.useLocalStorage;
|
||||||
|
},
|
||||||
|
set: function (sharedComputer) {
|
||||||
|
this.$store.commit("setUseLocalStorage", !sharedComputer);
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -352,8 +364,6 @@ export default {
|
||||||
const hasUser = this.currentUser ? true : false;
|
const hasUser = this.currentUser ? true : false;
|
||||||
var setProfileData = false;
|
var setProfileData = false;
|
||||||
|
|
||||||
var uniqueAliasPromise = Promise.resolve(true);
|
|
||||||
|
|
||||||
var roomId;
|
var roomId;
|
||||||
this.status = this.$t("new_room.status_creating");
|
this.status = this.$t("new_room.status_creating");
|
||||||
var createRoomOptions = {};
|
var createRoomOptions = {};
|
||||||
|
|
@ -372,18 +382,6 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Promise to get a unique alias and use it in room creation options.
|
|
||||||
//
|
|
||||||
uniqueAliasPromise = util
|
|
||||||
.getUniqueAliasForRoomName(
|
|
||||||
this.$matrix.matrixClient,
|
|
||||||
this.roomName,
|
|
||||||
this.$matrix.currentUserHomeServer
|
|
||||||
)
|
|
||||||
.then((alias) => {
|
|
||||||
createRoomOptions.room_alias_name = alias;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
//if (this.joinRule == "invite") {
|
//if (this.joinRule == "invite") {
|
||||||
createRoomOptions = {
|
createRoomOptions = {
|
||||||
|
|
@ -467,7 +465,21 @@ export default {
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return uniqueAliasPromise;
|
if (this.joinRule == "public") {
|
||||||
|
// Promise to get a unique alias and use it in room creation options.
|
||||||
|
//
|
||||||
|
return util
|
||||||
|
.getUniqueAliasForRoomName(
|
||||||
|
this.$matrix.matrixClient,
|
||||||
|
this.roomName,
|
||||||
|
this.$matrix.currentUserHomeServer
|
||||||
|
)
|
||||||
|
.then((alias) => {
|
||||||
|
createRoomOptions.room_alias_name = alias;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return Promise.resolve(true);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return this.$matrix.matrixClient
|
return this.$matrix.matrixClient
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue