diff --git a/.env b/.env
deleted file mode 100644
index 5436a1ed..00000000
--- a/.env
+++ /dev/null
@@ -1,2 +0,0 @@
-VITE_API_URL=https://peptide.chat/api
-# VITE_API_URL=http://local.revolt.chat:8000
diff --git a/.gitignore b/.gitignore
index f42007b4..d9c1202a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@ dist-ssr
*.local
*.log
/.idea
+.env
.yarn/cache
.yarn/install-state.gz
diff --git a/src/components/common/messaging/MessageBox.tsx b/src/components/common/messaging/MessageBox.tsx
index 78c26981..e2264c0d 100644
--- a/src/components/common/messaging/MessageBox.tsx
+++ b/src/components/common/messaging/MessageBox.tsx
@@ -45,6 +45,7 @@ import AutoComplete, { useAutoComplete } from "../AutoComplete";
import { PermissionTooltip } from "../Tooltip";
import FilePreview from "./bars/FilePreview";
import ReplyBar from "./bars/ReplyBar";
+import { User } from "@styled-icons/boxicons-regular";
type Props = {
channel: Channel;
@@ -256,26 +257,27 @@ export default observer(({ channel }: Props) => {
);
}
+ console.log(channel) //|| channel.channel_type != "DirectMessage"
+ if (channel.channel_type != "SavedMessages")
+ if (!channel.havePermission("SendMessage") && channel.channel_type == "TextChannel" || channel.recipient?.relationship == "Blocked" || channel.recipient?.relationship == "BlockedOther"){
- if (!channel.havePermission("SendMessage")) {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
// Push message content to draft.
const setMessage = useCallback(
(content?: string) => {
@@ -627,7 +629,7 @@ export default observer(({ channel }: Props) => {
)}
- {channel.havePermission("UploadFiles") ? (
+ {/* {channel.havePermission("UploadFiles") ? ( */}
{
}}
/>
- ) : (
+ {/* ) : (
- )}
+ )} */}
- {badges & Badges.Founder && (
+ {badges & Badges.Founder ? (
+ ) : (
+ <>>
)}
- {badges & Badges.Developer && (
+ {badges & Badges.Developer ? (
+ ) : (
+ <>>
)}
- {badges & Badges.Translator && (
+ {badges & Badges.Translator ? (
+ ) : (
+ <>>
)}
- {badges & Badges.EarlyAdopter && (
+ {badges & Badges.EarlyAdopter ? (
+ ) : (
+ <>>
)}
- {badges & Badges.PlatformModeration && (
+ {badges & Badges.PlatformModeration ? (
+ ) : (
+ <>>
)}
- {badges & Badges.ResponsibleDisclosure && (
+ {badges & Badges.ResponsibleDisclosure ? (
+ ) : (
+ <>>
)}
- {badges & Badges.Supporter && (
+ {badges & Badges.Supporter ? (
-
+
+ ) : (
+ <>>
)}
- {badges & Badges.ReservedRelevantJokeBadge1 && (
+ {badges & Badges.ReservedRelevantJokeBadge1 ? (
+ ) : (
+ <>>
)}
- {badges & Badges.ReservedRelevantJokeBadge2 && (
+ {badges & Badges.ReservedRelevantJokeBadge2 ? (
+ ) : (
+ <>>
)}
- {badges & Badges.Paw && (
+ {badges & Badges.Paw ? (
+ ) : (
+ <>>
)}
diff --git a/src/controllers/modals/components/CreateInvite.tsx b/src/controllers/modals/components/CreateInvite.tsx
index 3ef57a79..89c9d7cd 100644
--- a/src/controllers/modals/components/CreateInvite.tsx
+++ b/src/controllers/modals/components/CreateInvite.tsx
@@ -37,6 +37,7 @@ export default function CreateInvite({
}: ModalProps<"create_invite">) {
const [processing, setProcessing] = useState(false);
const [code, setCode] = useState("abcdef");
+ const [url, setUrl] = useState("abcdef");
// Generate an invite code
useEffect(() => {
@@ -44,7 +45,10 @@ export default function CreateInvite({
target
.createInvite()
- .then(({ _id }) => setCode(_id))
+ .then((res) => {
+ setUrl(res.url || "default_url");
+ setCode(res._id || "default_code");
+ })
.catch((err) =>
modalController.push({ type: "error", error: takeError(err) }),
)
diff --git a/src/controllers/modals/components/legacy/UserProfile.tsx b/src/controllers/modals/components/legacy/UserProfile.tsx
index 9cbb150a..f9040a66 100644
--- a/src/controllers/modals/components/legacy/UserProfile.tsx
+++ b/src/controllers/modals/components/legacy/UserProfile.tsx
@@ -207,7 +207,8 @@ export const UserProfile = observer(
)}
- {(user.relationship === "Friend" || user.bot) && (
+ {(user.relationship === "Friend" || user.relationship === "None" || user.relationship === "Outgoing" || user.relationship === "Incoming" || user.bot ) && (
+
0) {
@@ -110,7 +110,7 @@ export const Channel = observer(
target_id = last_id;
}
}
-
+
return (