make solo-user subscription a callback of unsubscribe

This commit is contained in:
Tyler Renelle 2013-05-11 12:32:36 +01:00
parent 747b6e7930
commit e701d98bd7

View file

@ -84,8 +84,8 @@ setupSubscriptions = (page, model, params, next, cb) ->
# (1) Solo player
unless party.get()
model.unsubscribe partyQ, (-> ) # they didn't have a party, let's not keep that subscription around. Also, async so we don't have to wait
return finished([selfQ, 'tavern'], ['_user', '_tavern'])
# they didn't have a party, let's not keep that subscription around. Also, async so we don't have to wait
return model.unsubscribe partyQ, ->finished([selfQ, 'tavern'], ['_user', '_tavern'])
## (2) Party has members, subscribe to those users too
model.ref '_party', party