From 11718cb1d0c0c1d8565ddfee059db33406d21a43 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 8 May 2017 16:34:43 +0200 Subject: [PATCH] Make action handler checks case insensitive --- src/directives/threema_action.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/directives/threema_action.ts b/src/directives/threema_action.ts index 5b2617ba0..49e15ef94 100644 --- a/src/directives/threema_action.ts +++ b/src/directives/threema_action.ts @@ -57,7 +57,7 @@ export default [ }; const getThreemaActionHandler = (name: string) => { - switch (name) { + switch (name.toLowerCase()) { case 'add': return addAction; case 'compose': @@ -80,7 +80,7 @@ export default [ && node.tagName.toLowerCase() === 'a') { const link = (node as HTMLElement).innerText; - if (link !== undefined && link.startsWith('threema://')) { + if (link !== undefined && link.toLowerCase().startsWith('threema://')) { const matches = (/\bthreema:\/\/([a-z]+)\?([^\s]+)\b/gi).exec(link); if (matches !== null) { const handler = getThreemaActionHandler(matches[1]);