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) {}