Merge branch 'dev'
This commit is contained in:
commit
ada23ecb36
2 changed files with 5 additions and 5 deletions
|
|
@ -29,7 +29,7 @@ function GroupDmsIcon({ channel }: { channel: Channel; }) {
|
|||
size="SIZE_40"
|
||||
aria-label={channel?.name || "Unnamed Group"}
|
||||
/> : <GroupDmsRecipientsIcon
|
||||
recipients={channel.recipients}
|
||||
recipients={channel?.recipients ?? []}
|
||||
size="SIZE_40"
|
||||
isTyping={null}
|
||||
/>;
|
||||
|
|
@ -51,7 +51,7 @@ export function getChannelDisplayName(channelId: string): string {
|
|||
}
|
||||
|
||||
// 1-on-1 DM
|
||||
const recipientId = channel.recipients?.[0];
|
||||
const recipientId = channel?.recipients?.[0] ?? "";
|
||||
const user = UserStore.getUser(recipientId);
|
||||
return user?.username || "Unknown User";
|
||||
}
|
||||
|
|
@ -115,6 +115,7 @@ export function GhostedUsersModal({ modalProps, ghostedChannels: initialChannels
|
|||
const lastMessageDate = lastMessage?.timestamp ? formatMessageDate(lastMessage.timestamp) : "";
|
||||
|
||||
const displayName = getChannelDisplayName(channel.id);
|
||||
const userId = channel?.recipients?.[0] ?? "";
|
||||
return (
|
||||
<div
|
||||
key={channelId}
|
||||
|
|
@ -125,7 +126,7 @@ export function GhostedUsersModal({ modalProps, ghostedChannels: initialChannels
|
|||
<GroupDmsIcon
|
||||
channel={channel}
|
||||
/> : <Avatar
|
||||
src={UserStore.getUser(channel.recipients?.[0])?.getAvatarURL(undefined, 128, true) || ""}
|
||||
src={UserStore.getUser(userId)?.getAvatarURL(undefined, 128, true)}
|
||||
size="SIZE_40"
|
||||
aria-label={displayName}
|
||||
/>}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import "./styles.css";
|
|||
|
||||
import { findGroupChildrenByChildId } from "@api/ContextMenu";
|
||||
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList";
|
||||
import { definePluginSettings, migratePluginSettings } from "@api/Settings";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { classNameFactory } from "@utils/css";
|
||||
|
|
@ -132,7 +132,6 @@ function makeContextItem(props) {
|
|||
/>;
|
||||
}
|
||||
|
||||
migratePluginSettings("Ghosted", "Boo");
|
||||
export default definePlugin({
|
||||
name: "Ghosted",
|
||||
description: "A cute ghost will appear if you don't answer their DMs",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue