From 810cf7741c794814d2873f16ca86c3004578173f Mon Sep 17 00:00:00 2001 From: mrwnslz Date: Mon, 9 Nov 2026 09:22:06 +0100 Subject: [PATCH] Podcast-Artikel: Benachrichtigungsziel episode: wie in der Android-Bridge, im Vertrag festgehalten Co-Authored-By: Claude Opus 5.5 --- docs/transcription.md | 3 ++- static/js/podcast-article.js | 2 +- tools/tests/podcast-article.test.mjs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/transcription.md b/docs/transcription.md index af270df..1b01650 100644 --- a/docs/transcription.md +++ b/docs/transcription.md @@ -43,7 +43,8 @@ Transcript and article are stored in plain text on the server, like all podcast Tapping it opens diora at the episode. 4. A device with a key (`static/js/podcast-article.js`) picks up the open wishes, reserves one, writes the article and saves it. It then says "Artikel fertig" (on Android as a system - notification through the bridge) and opens it on a tap. + notification through the bridge, `DioraNative.notify(title, text, target)` with target + `episode:` or `item:`; elsewhere a toast) and opens it on a tap. 5. The article is the first tab of the episode ("Artikel") and an item of the favourite blog "Podcast-Artikel", linking back to the episode. diff --git a/static/js/podcast-article.js b/static/js/podcast-article.js index 1141c86..b235943 100644 --- a/static/js/podcast-article.js +++ b/static/js/podcast-article.js @@ -303,7 +303,7 @@ export async function write(episodeId, {onState, signal} = {}) { export function notifyDone(title, episodeId) { const N = globalThis.DioraNative; try { - if (N && typeof N.notify === 'function') { N.notify('Artikel fertig', title, 'episode/' + episodeId); return; } + if (N && typeof N.notify === 'function') { N.notify('Artikel fertig', title, 'episode:' + episodeId); return; } } catch (e) { /* fall back to the toast */ } const AI = ai(); if (AI && AI.toast) AI.toast('Artikel fertig: ' + title); diff --git a/tools/tests/podcast-article.test.mjs b/tools/tests/podcast-article.test.mjs index 4a689af..2b974ae 100644 --- a/tools/tests/podcast-article.test.mjs +++ b/tools/tests/podcast-article.test.mjs @@ -152,7 +152,7 @@ test('pickUp: android bridge notifies instead of the toast', async () => { const got = []; globalThis.DioraNative = {notify: (...a) => got.push(a)}; await pa.pickUp(); - assert.deepEqual(got, [['Artikel fertig', 'Titel', 'episode/1']]); + assert.deepEqual(got, [['Artikel fertig', 'Titel', 'episode:1']]); assert.deepEqual(w.notices, []); globalThis.DioraNative = undefined; });