From f4b2b76881a3f8e28fe25b03e730dece5646d454 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Tue, 2 Jun 2026 22:54:49 +0700 Subject: [PATCH] =?UTF-8?q?The=20staging=20area=20is=20empty=20and=20the?= =?UTF-8?q?=20working=20tree=20is=20clean=20=E2=80=94=20there=20are=20**no?= =?UTF-8?q?=20staged=20changes=20to=20commit**.=20All=20changes=20from=20t?= =?UTF-8?q?he=20last=20commit=20(`8150c5a`)=20are=20already=20committed.?= =?UTF-8?q?=20If=20you=20want=20to=20amend=20that=20commit=20or=20make=20n?= =?UTF-8?q?ew=20changes,=20you'll=20need=20to=20stage=20some=20files=20fir?= =?UTF-8?q?st.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/ai-moderation/textCacheStore.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/discord-gateway/src/modules/ai-moderation/textCacheStore.ts b/services/discord-gateway/src/modules/ai-moderation/textCacheStore.ts index 616add7..25e7778 100644 --- a/services/discord-gateway/src/modules/ai-moderation/textCacheStore.ts +++ b/services/discord-gateway/src/modules/ai-moderation/textCacheStore.ts @@ -286,8 +286,10 @@ export async function computeImagePhash( ): Promise { try { // Dynamic import to avoid issues if imghash native bindings aren't available - const imghash = await import("imghash"); - const hash = await imghash.hash(buffer); + const imghashModule = await import("imghash"); + const hashFn = imghashModule.default?.hash ?? imghashModule.hash; + if (typeof hashFn !== "function") return null; + const hash = await hashFn(buffer); return hash; } catch { return null;