Allow sending without Widget API and fix widget ID decoding
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s

This commit is contained in:
2026-01-19 23:31:03 +01:00
parent c8b5f2e2d7
commit 28266524bd
2 changed files with 3 additions and 3 deletions

View File

@@ -85,8 +85,7 @@ function App() {
const handleGifSelect = async (gif: GifObject) => {
if (!ready) {
addLog("Error: Not connected to Matrix");
return;
addLog("⚠️ Widget not ready, trying direct send...");
}
setSendingState({ id: gif.id, status: 'sending' });

View File

@@ -27,7 +27,8 @@ export const useMatrixWidget = (onLog?: (msg: string) => void) => {
log(`URL Hash: ${window.location.hash}`);
const widgetId = searchParams.get('widgetId') || hashParams.get('widgetId');
const finalId = widgetId || 'my-widget-id';
// Decode the ID in case it was double-encoded or raw from URL
const finalId = widgetId ? decodeURIComponent(widgetId) : 'my-widget-id';
log(`Widget ID: ${finalId}`);