Hosted rooms' instance IDs start with their owner's IMVU account now, so the client asks about their products as the owner itself, and the mapping from 2100000000 is never used. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2df46da3ad
commit
56c47e806f
6 files changed
+6
-79
No files matched your search
@@ -425,24 +425,3 @@ func TestSavedOutfits(t *testing.T) {
|
||||
t.Fatalf("outfits %s", body)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHostedRoomProducts(t *testing.T) {
|
||||
h, _ := newHarness(t)
|
||||
h.do("POST", "https://secure.imvu.com/api/xmlrpc/client.php", call("test.avatarInfoForLogin2"), false, false)
|
||||
h.p.HostedOwner = func() int64 { return 7 } // the fake IMVU answers as user 7
|
||||
auths := xmlrpc.Struct{{Name: "auths", Value: []xmlrpc.Value{
|
||||
[]xmlrpc.Value{"userId", "productId"}, []xmlrpc.Value{int64(HostedOwnerID), int64(500)}}}}
|
||||
_, body := h.do("POST", "http://client-dynamic.imvu.com/api/xmlrpc/client.php", call("test.authorizeProducts2", auths), true, false)
|
||||
asked := h.imvu.asked["test.authorizeProducts2"]
|
||||
if len(asked) != 1 || strings.Contains(asked[0], "2100000000") {
|
||||
t.Fatalf("IMVU was asked %q", asked)
|
||||
}
|
||||
r, err := xmlrpc.ParseResponse(body)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
rows := r.Params[0].([]xmlrpc.Value)
|
||||
if first := rows[1].([]xmlrpc.Value); first[0] != int64(HostedOwnerID) || first[2] != int64(500) {
|
||||
t.Fatalf("answer %v", rows)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user