Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion scripts/whatsapp-gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,17 @@ def _iq_probe_once() -> None:
for name in ("get_user_info", "get_user_devices"):
fn = getattr(client, name, None)
if callable(fn):
fn([own_jid])
# The argument shape has shifted across neonize versions like the
# method names: some builds take a single JID, others a list. The
# installed build rejects a list ("expected JID got list"), which is
# a *type* error the probe would otherwise mistake for a wedge — and
# then tear the (healthy) connection down on every cycle. Try the
# single-JID form first, fall back to the list form on TypeError,
# mirroring the build_jid() adapter above.
try:
fn(own_jid)
except TypeError:
fn([own_jid])
return
raise _IQProbeUnsupported("neonize exposes neither get_user_info nor get_user_devices")

Expand Down
Loading