Refresh the inventory on the user's queue, which the client joins by connecting
CI / build (push) Successful in 25s
CI / build (push) Successful in 25s
The client never subscribes to its user queue; the proxy now follows every IMQ connection and the signed-in account (from the login answer), and delivers the refresh event on /user/<id>. Checked live: removing a product from the library on the hub reloads the client's inventory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
ca7a86ce89
commit
5b4e44c4e7
5 files changed
+34
-11
No files matched your search
@@ -60,6 +60,11 @@ func (p *Products) interceptXMLRPC(x *proxy.Exchange) error {
|
||||
case "test.avatarInfoForLogin2":
|
||||
x.ModifyResponse = func(resp *http.Response, body []byte) ([]byte, error) {
|
||||
p.keys.learn(body)
|
||||
if m := userIDPattern.FindSubmatch(body); m != nil {
|
||||
p.mu.Lock()
|
||||
p.user = string(m[1])
|
||||
p.mu.Unlock()
|
||||
}
|
||||
if m := userIDPattern.FindSubmatch(body); m != nil && p.Observer != nil {
|
||||
if id, err := strconv.ParseInt(string(m[1]), 10, 64); err == nil {
|
||||
p.Observer.Session(id)
|
||||
|
||||
Reference in new issue
Block a user