Add switch for join rule

For issue #86.
This commit is contained in:
N-Pex 2021-03-26 12:16:13 +01:00
parent b64c3a5791
commit 16d9ba7dbd
3 changed files with 204 additions and 50 deletions

View file

@ -0,0 +1,30 @@
<template>
<!-- ROOM JOIN RULES CHANGED -->
<div class="statusEvent">
{{ stateEventDisplayName(event) }} made the room {{ joinRule(event) }}
</div>
</template>
<script>
import messageMixin from "./messageMixin";
export default {
mixins: [messageMixin],
methods: {
joinRule(event) {
const joinRule = event.getContent().join_rule;
switch (joinRule) {
case "invite":
return "invite only";
case "public":
return "public";
}
return joinRule;
}
}
};
</script>
<style lang="scss">
@import "@/assets/css/chat.scss";
</style>