fix(utils): strip plus prefix from user JIDs in ParseJID
Adapted from upstream PR #224 (danie1net0). Queries addressed to "+<number>@s.whatsapp.net" are never answered by WhatsApp and hang until the IQ timeout (upstream issue #223: /user/info and /user/avatar hang 75s). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
fc35d72029
commit
c33b4d98fd
2 files changed
+10
-3
No files matched your search
@@ -284,13 +284,13 @@ func TestParseJID(t *testing.T) {
|
||||
name: "Valid phone number",
|
||||
input: "15551234567",
|
||||
expectOk: true,
|
||||
expectJID: "+[email protected]",
|
||||
expectJID: "[email protected]",
|
||||
},
|
||||
{
|
||||
name: "Valid BR number",
|
||||
input: "5531987654321",
|
||||
expectOk: true,
|
||||
expectJID: "+[email protected]",
|
||||
expectJID: "[email protected]",
|
||||
},
|
||||
{
|
||||
name: "Valid group ID",
|
||||
|
||||
Reference in new issue
Block a user