git » sdk » commit 2f57c13

Don't crash when there is no JID

author Stephen Paul Weber
2026-07-06 20:14:19 UTC
committer Stephen Paul Weber
2026-07-06 20:14:19 UTC
parent 80b888b5973c9f45a9dc6993691b3323eec16d14

Don't crash when there is no JID

We reuse this path for updates which very rarely may have a null jid

borogove/persistence/IDB.js +1 -1

diff --git a/borogove/persistence/IDB.js b/borogove/persistence/IDB.js
index 1ae627b..e3f5884 100644
--- a/borogove/persistence/IDB.js
+++ b/borogove/persistence/IDB.js
@@ -580,7 +580,7 @@ export default async (dbname, media, tokenize, stemmer) => {
 				chat: member.chat?.chatId ?? "",
 				roles: member.roles,
 				presence: new Map([...member.presence.entries()].map(([k, p]) => [k, p.toString()])),
-				jid: member.jid.asString(),
+				jid: member.jid?.asString(),
 			}))));
 
 			return true;