Room channel: other T5DE users' community products on their avatars
CI / build (push) Successful in 28s
CI / build (push) Successful in 28s
The proxy follows the client's IMQ chat subscriptions and tells the hub which chats it's in (and the room, from chat.getOrMakeChat). For the other T5DE users the hub says are in a chat, it gives the client the community products it has packs for, as *use and *remove lines from them, and adds them to the whole outfits they send. It also takes community products out of the outfit the client posts to IMVU's chat participant endpoint, which had been sending them to IMVU. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e394f1dc24
commit
93fa2f5d90
11 files changed
+858
-12
No files matched your search
@@ -44,15 +44,20 @@ type Products struct {
|
||||
byID map[string]*served
|
||||
problems map[string]string // pack directory -> last error logged
|
||||
|
||||
// Observer, if set, hears which IMVU account the client signs in as and the community products it wears (the
|
||||
// hub client).
|
||||
// Observer, if set, hears which IMVU account the client signs in as, the community products it wears, and the
|
||||
// chats it's in (the hub client).
|
||||
Observer Observer
|
||||
|
||||
roomMu sync.Mutex
|
||||
room room
|
||||
}
|
||||
|
||||
// Observer hears about the client's IMVU account and its community outfit.
|
||||
// Observer hears about the client's IMVU account, its community outfit, and the chats it's in.
|
||||
type Observer interface {
|
||||
Session(imvuID int64)
|
||||
Outfit(imvuID int64, items []hub.Item)
|
||||
Join(chat, room string)
|
||||
Leave(chat string)
|
||||
}
|
||||
|
||||
// served is a pack ready to serve.
|
||||
@@ -305,7 +310,7 @@ func (p *Products) reportOutfit(user string, locals []int64) {
|
||||
items := []hub.Item{}
|
||||
for _, local := range locals {
|
||||
if s := p.lookup(local); s != nil {
|
||||
items = append(items, hub.Item{ID: s.pack.Manifest.ID, Name: s.pack.Manifest.Name})
|
||||
items = append(items, hub.Item{ID: s.pack.Manifest.ID, Name: s.pack.Manifest.Name, Adult: s.pack.Manifest.Rating == "adult"})
|
||||
}
|
||||
}
|
||||
p.Observer.Outfit(id, items)
|
||||
|
||||
Reference in new issue
Block a user