-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Scene had an issue where allying a new ship would set its reducer to undefined, causing subsequent searches to then send a duplicate ally poke by accident (tirrel-corp/scene#41). To be specific, this poke:
{
app: 'treaty',
mark: 'ally-update-0',
json: {
add: ship
}
};
When we send that duplicate poke, what we find is the following:
- We get an
iniwith an empty list of treaties for the ally. - In Dojo, we see a crash because the subscription already exists.
- On subsequent visits on any client (Scene, Grid, whatever), looking up treaties from the ally results in our ship dutifully saying there are no apps available, because we have the ally stored with an empty treaty list in state.
This is what I would expect if the poke itself results in treaty.hoon setting an empty list of treaties for that ally alongside the subscription request. What should happen is that if the ally is already in state, we ignore the poke.
Likewise, I'm not sure what the workaround is for people who have run into this already. Can we just nuke it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working