parent
b64c3a5791
commit
16d9ba7dbd
3 changed files with 204 additions and 50 deletions
30
src/components/messages/RoomJoinRules.vue
Normal file
30
src/components/messages/RoomJoinRules.vue
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue