From 137a81c6a8e9d13fca49e7d965a0ecaed3ea7d28 Mon Sep 17 00:00:00 2001 From: "Claude Opus 4.7" Date: Thu, 21 May 2026 00:42:42 -0500 Subject: [PATCH] =?UTF-8?q?label:=20source=20'phone'=20=E2=86=92=20'web'?= =?UTF-8?q?=20(page=20works=20from=20any=20browser)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- server/main.go | 2 +- server/web/index.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/main.go b/server/main.go index 78d40c9..71b4c7c 100644 --- a/server/main.go +++ b/server/main.go @@ -135,7 +135,7 @@ func main() { if m.Source == "" { m.Source = r.Header.Get("X-Tether-Source") if m.Source == "" { - m.Source = "phone" + m.Source = "web" } } m.TS = time.Now().UnixMilli() diff --git a/server/web/index.html b/server/web/index.html index 819becd..e724d52 100644 --- a/server/web/index.html +++ b/server/web/index.html @@ -147,7 +147,7 @@ const r = await fetch("/api/send", { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ type: "clipboard", text, source: "phone" }), + body: JSON.stringify({ type: "clipboard", text, source: "web" }), }); status(r.ok ? "delivered ✓" : "server returned " + r.status, r.ok ? "ok" : "err"); } catch (e) { status("network error", "err"); } @@ -163,7 +163,7 @@ body: JSON.stringify({ type: "signal", from: peerID, - source: "phone", + source: "web", signal: JSON.stringify(payload), }), }); @@ -207,7 +207,7 @@ es.addEventListener("clipboard", (ev) => { try { const m = JSON.parse(ev.data); - if (m.source !== "phone") { + if (m.source !== "web") { addIncoming(m.text, m.source, m.ts, false); } } catch (e) {}