From 54982298fab3323c751c6ea765a5f1fa72bb5850 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Wed, 5 Jun 2024 15:44:34 +0200 Subject: [PATCH] Make channels unencrypted Also, show info about older messages being deleted in rooms with message retention set. --- src/assets/translations/en.json | 1 + src/components/Chat.vue | 5 +++ src/components/CreateChannel.vue | 16 ++++---- .../WelcomeHeaderChannelUser.vue | 37 +++++++++++++++++++ 4 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 src/components/welcome_headers/WelcomeHeaderChannelUser.vue diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index 73316b0..2d39f4d 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -140,6 +140,7 @@ "direct_private_chat": "Direct Message", "join_channel": "All set! Invite people to join you: {link}", "info_retention": "🕓 Messages sent within {time} are viewable by anyone with the link.", + "info_retention_user": "🕓 Messages older than {time} will be deleted from the history.", "change": "Change" }, "new_room": { diff --git a/src/components/Chat.vue b/src/components/Chat.vue index bac6bbc..be65352 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -54,6 +54,9 @@ + + +
{{ dayForEvent(event) }}
@@ -346,6 +349,7 @@ import RoomInfoBottomSheet from "./RoomInfoBottomSheet"; import WelcomeHeaderRoom from "./welcome_headers/WelcomeHeaderRoom"; import WelcomeHeaderDirectChat from "./welcome_headers/WelcomeHeaderDirectChat"; import WelcomeHeaderChannel from "./welcome_headers/WelcomeHeaderChannel"; +import WelcomeHeaderChannelUser from "./welcome_headers/WelcomeHeaderChannelUser"; import NoHistoryRoomWelcomeHeader from "./NoHistoryRoomWelcomeHeader.vue"; import MessageOperationsBottomSheet from "./MessageOperationsBottomSheet"; import StickerPickerBottomSheet from "./StickerPickerBottomSheet"; @@ -413,6 +417,7 @@ export default { FileDropLayout, UserProfileDialog, PurgeRoomDialog, + WelcomeHeaderChannelUser }, data() { diff --git a/src/components/CreateChannel.vue b/src/components/CreateChannel.vue index 6e2ffb3..4a42063 100644 --- a/src/components/CreateChannel.vue +++ b/src/components/CreateChannel.vue @@ -145,18 +145,18 @@ export default { preset: "public_chat", initial_state: [ - { - type: "m.room.encryption", - state_key: "", - content: { - algorithm: "m.megolm.v1.aes-sha2", - }, - }, + // { + // type: "m.room.encryption", + // state_key: "", + // content: { + // algorithm: "m.megolm.v1.aes-sha2", + // }, + // }, { type: "m.room.history_visibility", state_key: "", content: { - history_visibility: "joined" + history_visibility: "shared" } }, { diff --git a/src/components/welcome_headers/WelcomeHeaderChannelUser.vue b/src/components/welcome_headers/WelcomeHeaderChannelUser.vue new file mode 100644 index 0000000..30af81a --- /dev/null +++ b/src/components/welcome_headers/WelcomeHeaderChannelUser.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file