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
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s
This commit is contained in:
@@ -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' });
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user