Compare commits
8 Commits
v1.0.6
...
feat/relat
Author | SHA1 | Date | |
---|---|---|---|
|
0e06b8d34c | ||
|
b972aa1663 | ||
|
3bf81ee0fa | ||
|
486230a335 | ||
|
77c691651e | ||
|
e14ec96e21 | ||
|
ff1f337699 | ||
|
3ca87848e5 |
@ -91,7 +91,8 @@ ipcMain.handle(IpcEvents.OPEN_MONACO_EDITOR, async () => {
|
|||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: join(__dirname, "preload.js"),
|
preload: join(__dirname, "preload.js"),
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
nodeIntegration: false
|
nodeIntegration: false,
|
||||||
|
sandbox: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await win.loadURL(`data:text/html;base64,${monacoHtml}`);
|
await win.loadURL(`data:text/html;base64,${monacoHtml}`);
|
||||||
|
@ -22,11 +22,14 @@ import { Devs } from "@utils/constants";
|
|||||||
import { ApngDisposeOp, getGifEncoder, importApngJs } from "@utils/dependencies";
|
import { ApngDisposeOp, getGifEncoder, importApngJs } from "@utils/dependencies";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
||||||
import { ChannelStore, UserStore } from "@webpack/common";
|
import { ChannelStore, PermissionStore, UserStore } from "@webpack/common";
|
||||||
|
|
||||||
const DRAFT_TYPE = 0;
|
const DRAFT_TYPE = 0;
|
||||||
const promptToUpload = findByCodeLazy("UPLOAD_FILE_LIMIT_ERROR");
|
const promptToUpload = findByCodeLazy("UPLOAD_FILE_LIMIT_ERROR");
|
||||||
|
|
||||||
|
const USE_EXTERNAL_EMOJIS = 1n << 18n;
|
||||||
|
const USE_EXTERNAL_STICKERS = 1n << 37n;
|
||||||
|
|
||||||
enum EmojiIntentions {
|
enum EmojiIntentions {
|
||||||
REACTION = 0,
|
REACTION = 0,
|
||||||
STATUS = 1,
|
STATUS = 1,
|
||||||
@ -69,8 +72,8 @@ migratePluginSettings("FakeNitro", "NitroBypass");
|
|||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "FakeNitro",
|
name: "FakeNitro",
|
||||||
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven, Devs.obscurity],
|
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven, Devs.obscurity, Devs.captain],
|
||||||
description: "Allows you to stream in nitro quality and send fake emojis/stickers.",
|
description: "Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",
|
||||||
dependencies: ["MessageEventsAPI"],
|
dependencies: ["MessageEventsAPI"],
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
@ -79,12 +82,16 @@ export default definePlugin({
|
|||||||
predicate: () => Settings.plugins.FakeNitro.enableEmojiBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableEmojiBypass === true,
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=(?<intention>\i)=\i\.intention.+?\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i)(?=\))/g,
|
match: /(?<=(?<intention>\i)=\i\.intention)/,
|
||||||
replace: ",$<intention>"
|
replace: ",fakeNitroIntention=$<intention>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(?<=,\i=)\i\.\i\.can\(\i\.\i\.USE_EXTERNAL_EMOJIS,\i\)(?=;)/,
|
match: /(?<=\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i)(?=\))/g,
|
||||||
replace: "true"
|
replace: ",fakeNitroIntention"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /(?<=&&!\i&&)!(?<canUseExternal>\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,
|
||||||
|
replace: `(!$<canUseExternal>&&![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -92,12 +99,12 @@ export default definePlugin({
|
|||||||
find: "canUseAnimatedEmojis:function",
|
find: "canUseAnimatedEmojis:function",
|
||||||
predicate: () => Settings.plugins.FakeNitro.enableEmojiBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableEmojiBypass === true,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=(?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){/g,
|
match: /(?<=(?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\((?<user>\i))\){(?<premiumCheck>.+?\))/g,
|
||||||
replace: `,fakeNitroIntention){return fakeNitroIntention===undefined||[${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention);`
|
replace: `,fakeNitroIntention){$<premiumCheck>||fakeNitroIntention===undefined||[${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "canUseAnimatedEmojis:function",
|
find: "canUseStickersEverywhere:function",
|
||||||
predicate: () => Settings.plugins.FakeNitro.enableStickerBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableStickerBypass === true,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUseStickersEverywhere:function\(.+?\{/,
|
match: /canUseStickersEverywhere:function\(.+?\{/,
|
||||||
@ -113,7 +120,7 @@ export default definePlugin({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "canUseAnimatedEmojis:function",
|
find: "canStreamHighQuality:function",
|
||||||
predicate: () => Settings.plugins.FakeNitro.enableStreamQualityBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableStreamQualityBypass === true,
|
||||||
replacement: [
|
replacement: [
|
||||||
"canUseHighVideoUploadQuality",
|
"canUseHighVideoUploadQuality",
|
||||||
@ -134,6 +141,13 @@ export default definePlugin({
|
|||||||
replace: ""
|
replace: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
find: "canUseClientThemes:function",
|
||||||
|
replacement: {
|
||||||
|
match: /(?<=canUseClientThemes:function\(\i\){)/,
|
||||||
|
replace: "return true;"
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
@ -181,6 +195,22 @@ export default definePlugin({
|
|||||||
return (UserStore.getCurrentUser().premiumType ?? 0) > 1;
|
return (UserStore.getCurrentUser().premiumType ?? 0) > 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hasPermissionToUseExternalEmojis(channelId: string) {
|
||||||
|
const channel = ChannelStore.getChannel(channelId);
|
||||||
|
|
||||||
|
if (!channel || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return true;
|
||||||
|
|
||||||
|
return PermissionStore.can(USE_EXTERNAL_EMOJIS, channel);
|
||||||
|
},
|
||||||
|
|
||||||
|
hasPermissionToUseExternalStickers(channelId: string) {
|
||||||
|
const channel = ChannelStore.getChannel(channelId);
|
||||||
|
|
||||||
|
if (!channel || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return true;
|
||||||
|
|
||||||
|
return PermissionStore.can(USE_EXTERNAL_STICKERS, channel);
|
||||||
|
},
|
||||||
|
|
||||||
getStickerLink(stickerId: string) {
|
getStickerLink(stickerId: string) {
|
||||||
return `https://media.discordapp.net/stickers/${stickerId}.png?size=${Settings.plugins.FakeNitro.stickerSize}`;
|
return `https://media.discordapp.net/stickers/${stickerId}.png?size=${Settings.plugins.FakeNitro.stickerSize}`;
|
||||||
},
|
},
|
||||||
@ -265,7 +295,7 @@ export default definePlugin({
|
|||||||
if (!sticker)
|
if (!sticker)
|
||||||
break stickerBypass;
|
break stickerBypass;
|
||||||
|
|
||||||
if (sticker.available !== false && (this.canUseStickers || (sticker as GuildSticker)?.guild_id === guildId))
|
if (sticker.available !== false && ((this.canUseStickers && this.hasPermissionToUseExternalStickers(channelId)) || (sticker as GuildSticker)?.guild_id === guildId))
|
||||||
break stickerBypass;
|
break stickerBypass;
|
||||||
|
|
||||||
let link = this.getStickerLink(sticker.id);
|
let link = this.getStickerLink(sticker.id);
|
||||||
@ -288,7 +318,7 @@ export default definePlugin({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.canUseEmotes && settings.enableEmojiBypass) {
|
if ((!this.canUseEmotes || !this.hasPermissionToUseExternalEmojis(channelId)) && settings.enableEmojiBypass) {
|
||||||
for (const emoji of messageObj.validNonShortcutEmojis) {
|
for (const emoji of messageObj.validNonShortcutEmojis) {
|
||||||
if (!emoji.require_colons) continue;
|
if (!emoji.require_colons) continue;
|
||||||
if (emoji.guildId === guildId && !emoji.animated) continue;
|
if (emoji.guildId === guildId && !emoji.animated) continue;
|
||||||
@ -304,8 +334,9 @@ export default definePlugin({
|
|||||||
return { cancel: false };
|
return { cancel: false };
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!this.canUseEmotes && settings.enableEmojiBypass) {
|
this.preEdit = addPreEditListener((channelId, __, messageObj) => {
|
||||||
this.preEdit = addPreEditListener((_, __, messageObj) => {
|
if (this.canUseEmotes && this.hasPermissionToUseExternalEmojis(channelId)) return;
|
||||||
|
|
||||||
const { guildId } = this;
|
const { guildId } = this;
|
||||||
|
|
||||||
for (const [emojiStr, _, emojiId] of messageObj.content.matchAll(/(?<!\\)<a?:(\w+):(\d+)>/ig)) {
|
for (const [emojiStr, _, emojiId] of messageObj.content.matchAll(/(?<!\\)<a?:(\w+):(\d+)>/ig)) {
|
||||||
@ -319,7 +350,6 @@ export default definePlugin({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
250
src/plugins/relationshipNotifier.ts
Normal file
250
src/plugins/relationshipNotifier.ts
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
/*
|
||||||
|
* Vencord, a modification for Discord's desktop app
|
||||||
|
* Copyright (c) 2023 Vendicated and contributors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { showNotification } from "@api/Notifications";
|
||||||
|
import { definePluginSettings } from "@api/settings";
|
||||||
|
import { Devs } from "@utils/constants";
|
||||||
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
|
import { FluxDispatcher, UserUtils } from "@webpack/common";
|
||||||
|
import { User } from "discord-types/general";
|
||||||
|
|
||||||
|
enum RelationshipType {
|
||||||
|
NONE = 0,
|
||||||
|
FRIEND = 1,
|
||||||
|
BLOCKED = 2,
|
||||||
|
PENDING_INCOMING = 3,
|
||||||
|
PENDING_OUTGOING = 4,
|
||||||
|
IMPLICIT = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RelationshipPayload {
|
||||||
|
type: "RELATIONSHIP_ADD" | "RELATIONSHIP_REMOVE" | "RELATIONSHIP_UPDATE";
|
||||||
|
relationship: {
|
||||||
|
id: string;
|
||||||
|
type: RelationshipType;
|
||||||
|
since?: Date;
|
||||||
|
nickname?: string;
|
||||||
|
user?: User;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const settings = definePluginSettings({
|
||||||
|
friend: {
|
||||||
|
type: OptionType.SELECT,
|
||||||
|
description: "Show a notification when a friend is added or removed",
|
||||||
|
options: [{
|
||||||
|
label: "Friend added and removed",
|
||||||
|
value: "ALL",
|
||||||
|
default: true,
|
||||||
|
}, {
|
||||||
|
label: "Only when added",
|
||||||
|
value: "CREATE",
|
||||||
|
}, {
|
||||||
|
label: "Only when removed",
|
||||||
|
value: "REMOVE",
|
||||||
|
}, {
|
||||||
|
label: "No notifications",
|
||||||
|
value: "NONE",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
outgoingRequest: {
|
||||||
|
type: OptionType.SELECT,
|
||||||
|
description: "Show a notification when you send or cancel a friend request",
|
||||||
|
options: [{
|
||||||
|
label: "Request sent and cancelled",
|
||||||
|
value: "ALL",
|
||||||
|
default: true,
|
||||||
|
}, {
|
||||||
|
label: "Only when sent",
|
||||||
|
value: "CREATE",
|
||||||
|
}, {
|
||||||
|
label: "Only when cancelled",
|
||||||
|
value: "REMOVE",
|
||||||
|
}, {
|
||||||
|
label: "No notifications",
|
||||||
|
value: "NONE",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
incomingRequest: {
|
||||||
|
type: OptionType.SELECT,
|
||||||
|
description: "Show a notification when an incoming request is received or cancelled",
|
||||||
|
options: [{
|
||||||
|
label: "Request received and cancelled",
|
||||||
|
value: "ALL",
|
||||||
|
default: true,
|
||||||
|
}, {
|
||||||
|
label: "Only when received",
|
||||||
|
value: "CREATE",
|
||||||
|
}, {
|
||||||
|
label: "Only when cancelled",
|
||||||
|
value: "REMOVE",
|
||||||
|
}, {
|
||||||
|
label: "No notifications",
|
||||||
|
value: "NONE",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
block: {
|
||||||
|
type: OptionType.SELECT,
|
||||||
|
description: "Show a notification when you block or unblock a user",
|
||||||
|
options: [{
|
||||||
|
label: "Blocking and unblocking",
|
||||||
|
value: "ALL",
|
||||||
|
default: true,
|
||||||
|
}, {
|
||||||
|
label: "Only when blocking",
|
||||||
|
value: "CREATE",
|
||||||
|
}, {
|
||||||
|
label: "Only when unblocking",
|
||||||
|
value: "REMOVE",
|
||||||
|
}, {
|
||||||
|
label: "No notifications",
|
||||||
|
value: "NONE",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default definePlugin({
|
||||||
|
name: "RelationshipNotifier",
|
||||||
|
authors: [Devs.Megu],
|
||||||
|
description: "Receive notifications for friend requests, removals, blocks, etc.",
|
||||||
|
settings,
|
||||||
|
|
||||||
|
start() {
|
||||||
|
FluxDispatcher.subscribe("RELATIONSHIP_ADD", onRelationshipUpdate);
|
||||||
|
FluxDispatcher.subscribe("RELATIONSHIP_UPDATE", onRelationshipUpdate);
|
||||||
|
FluxDispatcher.subscribe("RELATIONSHIP_REMOVE", onRelationshipRemove);
|
||||||
|
},
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
FluxDispatcher.unsubscribe("RELATIONSHIP_ADD", onRelationshipUpdate);
|
||||||
|
FluxDispatcher.unsubscribe("RELATIONSHIP_UPDATE", onRelationshipUpdate);
|
||||||
|
FluxDispatcher.unsubscribe("RELATIONSHIP_REMOVE", onRelationshipRemove);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
async function onRelationshipUpdate({ relationship }: RelationshipPayload) {
|
||||||
|
if (!relationship.id) return;
|
||||||
|
const user = await UserUtils.fetchUser(relationship.id);
|
||||||
|
if (!user) return;
|
||||||
|
|
||||||
|
function onClick() {
|
||||||
|
FluxDispatcher.dispatch({
|
||||||
|
type: "USER_PROFILE_MODAL_OPEN",
|
||||||
|
userId: user.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (relationship.type) {
|
||||||
|
case RelationshipType.FRIEND: {
|
||||||
|
if (!["ALL", "CREATE"].includes(settings.store.friend)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "Friend Added",
|
||||||
|
body: `${user.username} is now your friend.`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RelationshipType.PENDING_INCOMING: {
|
||||||
|
if (!["ALL", "CREATE"].includes(settings.store.incomingRequest)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "Friend Request Received",
|
||||||
|
body: `${user.username} sent you a friend request.`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RelationshipType.PENDING_OUTGOING: {
|
||||||
|
if (!["ALL", "CREATE"].includes(settings.store.outgoingRequest)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "Friend Request Sent",
|
||||||
|
body: `You sent a friend request to ${user.username}`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RelationshipType.BLOCKED: {
|
||||||
|
if (!["ALL", "CREATE"].includes(settings.store.block)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "User Blocked",
|
||||||
|
body: `You just blocked ${user.username}`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onRelationshipRemove({ relationship }: RelationshipPayload) {
|
||||||
|
if (!relationship.id) return;
|
||||||
|
const user = await UserUtils.fetchUser(relationship.id);
|
||||||
|
if (!user) return;
|
||||||
|
|
||||||
|
function onClick() {
|
||||||
|
FluxDispatcher.dispatch({
|
||||||
|
type: "USER_PROFILE_MODAL_OPEN",
|
||||||
|
userId: user.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (relationship.type) {
|
||||||
|
case RelationshipType.FRIEND: {
|
||||||
|
if (!["ALL", "REMOVE"].includes(settings.store.friend)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "Friend Removed",
|
||||||
|
body: `${user.username} is no longer on your friends list.`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RelationshipType.PENDING_INCOMING: {
|
||||||
|
if (!["ALL", "REMOVE"].includes(settings.store.incomingRequest)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "Friend Request Cancelled",
|
||||||
|
body: `${user.username} cancelled their friend request.`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RelationshipType.PENDING_OUTGOING: {
|
||||||
|
if (!["ALL", "REMOVE"].includes(settings.store.outgoingRequest)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "Friend Request Cancelled",
|
||||||
|
body: `You cancelled your friend request to ${user.username}`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RelationshipType.BLOCKED: {
|
||||||
|
if (!["ALL", "REMOVE"].includes(settings.store.block)) break;
|
||||||
|
showNotification({
|
||||||
|
title: "User Unblocked",
|
||||||
|
body: `You just unblocked ${user.username}`,
|
||||||
|
icon: user.getAvatarURL(),
|
||||||
|
onClick
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,7 @@ export default function ReviewsView({ userId }: { userId: string; }) {
|
|||||||
fallbackValue: [],
|
fallbackValue: [],
|
||||||
deps: [refetchCount],
|
deps: [refetchCount],
|
||||||
});
|
});
|
||||||
|
const username = UserStore.getUser(userId)?.username ?? "";
|
||||||
|
|
||||||
const dirtyRefetch = () => setRefetchCount(refetchCount + 1);
|
const dirtyRefetch = () => setRefetchCount(refetchCount + 1);
|
||||||
|
|
||||||
@ -79,7 +80,7 @@ export default function ReviewsView({ userId }: { userId: string; }) {
|
|||||||
<textarea
|
<textarea
|
||||||
className={classes(Classes.textarea.replace("textarea", ""), "enter-comment")}
|
className={classes(Classes.textarea.replace("textarea", ""), "enter-comment")}
|
||||||
// this produces something like '-_59yqs ...' but since no class exists with that name its fine
|
// this produces something like '-_59yqs ...' but since no class exists with that name its fine
|
||||||
placeholder={"Review @" + UserStore.getUser(userId)?.username ?? ""}
|
placeholder={reviews?.some(r => r.senderdiscordid === UserStore.getCurrentUser().id) ? `Update review for @${username}` : `Review @${username}`}
|
||||||
onKeyDown={onKeyPress}
|
onKeyDown={onKeyPress}
|
||||||
style={{
|
style={{
|
||||||
marginTop: "6px",
|
marginTop: "6px",
|
||||||
|
@ -73,7 +73,7 @@ function TypingIndicator({ channelId }: { channelId: string; }) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3: {
|
case 3: {
|
||||||
tooltipText = Formatters.Messages.THREE_USERS_TYPING.format({ a: getDisplayName(guildId, typingUsersArray[0]), b: getDisplayName(guildId, typingUsersArray[1]), c: getDisplayName(guildId, typingUsersArray[1]) });
|
tooltipText = Formatters.Messages.THREE_USERS_TYPING.format({ a: getDisplayName(guildId, typingUsersArray[0]), b: getDisplayName(guildId, typingUsersArray[1]), c: getDisplayName(guildId, typingUsersArray[2]) });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
Reference in New Issue
Block a user