diff --git a/package.json b/package.json index 318378c3..32183d26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vocechat-web", - "version": "0.7.32", + "version": "0.7.33", "homepage": "https://voce.chat", "dependencies": { "@metamask/onboarding": "^1.0.1", diff --git a/public/locales/en/setting.json b/public/locales/en/setting.json index 3a61db2a..38d88f4c 100644 --- a/public/locales/en/setting.json +++ b/public/locales/en/setting.json @@ -44,7 +44,7 @@ "add_friend": "Add friend", "dm_to_member": "DM to Member", "show_email": "Show Email", - "only_owner": "Only Owner Send Message" + "only_owner": "Only Owner Can Send Message" }, "dm": { "delete": "Delete User", @@ -62,16 +62,16 @@ "invite": "Invitation Link Only" }, "admin_create_group": { - "title": "Only Admins create group", + "title": "Only Admins Can Create Group", "desc": "If enabled, only admins can create group.", "enable": "Enable", - "disable": "Disabled" + "disable": "Disable" }, "guest_mode": { "title": "Guest Mode", "desc": "If enabled, visitors will see public channels on this server.", "enable": "Enable", - "disable": "Disabled" + "disable": "Disable" }, "url": { "title": "Update Frontend URL", diff --git a/public/locales/pt/setting.json b/public/locales/pt/setting.json index 1189efb0..6ec4e90c 100644 --- a/public/locales/pt/setting.json +++ b/public/locales/pt/setting.json @@ -56,7 +56,7 @@ "title": "Guest Mode", "desc": "If enabled, visitors will see public channels on this server.", "enable": "Enable", - "disable": "Disabled" + "disable": "Disable" }, "url": { "title": "Update Frontend URL", diff --git a/src/app/slices/channels.ts b/src/app/slices/channels.ts index 8e742837..708a7e57 100644 --- a/src/app/slices/channels.ts +++ b/src/app/slices/channels.ts @@ -1,8 +1,9 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { isNull, omitBy } from "lodash"; +import { omitBy } from "lodash"; import { Channel, UpdateChannelDTO, UpdatePinnedMessageDTO } from "@/types/channel"; import BASE_URL from "../config"; +import { isUndefinedOrNull } from "@udecode/plate-common"; // import { updateVoicingInfo } from "./voice"; @@ -74,8 +75,13 @@ const channelsSlice = createSlice({ break; } default: - // old code: state.byId[gid] = { ...state.byId[gid]!, ...getNonNullValues(rest) }; - state.byId[gid] = { ...state.byId[gid]!, ...omitBy(rest, isNull) }; + { + const wtf = omitBy(rest, isUndefinedOrNull); + console.log("rrrr", wtf); + + // old code: state.byId[gid] = { ...state.byId[gid]!, ...getNonNullValues(rest) }; + state.byId[gid] = { ...state.byId[gid]!, ...wtf }; + } break; } }, diff --git a/src/components/Send/index.tsx b/src/components/Send/index.tsx index 40abf982..595f0496 100644 --- a/src/components/Send/index.tsx +++ b/src/components/Send/index.tsx @@ -146,13 +146,9 @@ const Send: FC = ({ const onlyOwnerCanSend = !!(context == "channel" ? channelsData[id]?.only_owner_can_send_msg : false); - const canSendMessageInChannel = !isChannelOwner && onlyOwnerCanSend; - if (canSendMessageInChannel) { - return ( -
- only Channel owner can send message! -
- ); + const canNotSendMessageInChannel = !isChannelOwner && onlyOwnerCanSend; + if (canNotSendMessageInChannel) { + return null; } if (context == "dm" && blocked) { return (