"Private chat" header for direct chats

Also, auto-create account and room when joining a DM chat link.
This commit is contained in:
N-Pex 2023-08-30 10:50:45 +02:00
parent 46bd105449
commit 68b241b6ce
9 changed files with 437 additions and 37 deletions

View file

@ -132,6 +132,23 @@
</div>
</div>
</div>
<!-- Loading indicator -->
<v-container
v-else
fluid
fill-height
class="loading-indicator"
>
<v-row align="center" justify="center">
<v-col class="text-center">
<v-progress-circular
indeterminate
color="primary"
></v-progress-circular>
</v-col>
</v-row>
</v-container>
</template>
<script>
@ -304,19 +321,10 @@ export default {
});
} else if (this.roomId.startsWith("@")) {
// Direct chat with user
this.$matrix
.getPublicUserInfo(this.roomId)
.then((info) => {
console.log("Got user info:", info);
this.roomName = info.displayname;
this.roomAvatar = info.avatar;
})
.catch((err) => {
console.log("Failed to get user info: ", err);
})
.finally(() => {
this.waitingForInfo = false;
});
this.waitingForInfo = false;
this.$nextTick(() => {
this.handleJoin();
});
} else {
// Private room, try to get name
const room = this.$matrix.getRoom(this.roomId);