add first cut at deep-link redirecting, with one example contact-import that works on mobile

This commit is contained in:
2025-06-18 13:16:17 -06:00
parent 1a886524b6
commit c1eb242616
12 changed files with 302 additions and 78 deletions

View File

@@ -1,6 +1,6 @@
import { logToDb } from "../db/databaseUtil";
function safeStringify(obj: unknown) {
export function safeStringify(obj: unknown) {
const seen = new WeakSet();
return JSON.stringify(obj, (_key, value) => {
@@ -67,8 +67,9 @@ export const logger = {
// Errors will always be logged
// eslint-disable-next-line no-console
console.error(message, ...args);
const argsString = args.length > 0 ? " - " + safeStringify(args) : "";
logToDb(message + argsString);
const messageString = safeStringify(message);
const argsString = args.length > 0 ? safeStringify(args) : "";
logToDb(messageString + argsString);
},
};