Implement new "read only" room flag

While still maintaining the ability to answer polls and send reactions in channels (when "read only" is false)
This commit is contained in:
N-Pex 2024-04-26 16:44:06 +02:00
parent 1e31b0c24e
commit 371a5069af
10 changed files with 112 additions and 68 deletions

View file

@ -147,7 +147,7 @@ export default {
},
computed: {
canRecordAudio() {
return !this.$matrix.currentRoomIsReadOnlyForUser && util.browserCanRecordAudio();
return this.$matrix.userCanSendMessageInCurrentRoom && util.browserCanRecordAudio();
},
currentTime() {
return util.formatDuration(this.info ? this.info.currentTime : 0);
@ -414,7 +414,7 @@ export default {
},
micButtonClicked() {
if (this.$matrix.currentRoomIsReadOnlyForUser) {
if (!this.$matrix.userCanSendMessageInCurrentRoom) {
this.showReadOnlyToast = true;
setTimeout(() => {
this.showReadOnlyToast = false;