feat(weixin_ilink): 扫码协议与腾讯官方对齐——POST local_token_list + iLink-App-Id/ClientVersion 头 + need_verifycode/redirect 状态机
This commit is contained in:
1 parent
bef398d47a
commit
f5950e4bde
9 files changed
+508
-99
No files matched your search
@@ -159,6 +159,22 @@ func TestAdapter_SetMessageHandler_And_RecordInbound(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildClientVersion(t *testing.T) {
|
||||
t.Parallel()
|
||||
cases := map[string]string{
|
||||
"2.4.8": "132104", // official @tencent-weixin/openclaw-weixin 2.4.8
|
||||
"1.0.11": "65547", // official comment example 0x0001000B
|
||||
"1.2.3": "66051",
|
||||
"0.0.0": "0",
|
||||
"bad": "0",
|
||||
}
|
||||
for in, want := range cases {
|
||||
if got := buildClientVersion(in); got != want {
|
||||
t.Fatalf("buildClientVersion(%q) = %q, want %q", in, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdapter_Recipient_ResolvesGroupAndSender(t *testing.T) {
|
||||
t.Parallel()
|
||||
tests := []struct {
|
||||
|
||||
Reference in new issue
Block a user