-
Notifications
You must be signed in to change notification settings - Fork 92
Postmaster Actions
As time allows or people come forward with questions, I'll update this page with implementation details concerning postmaster actions.
(pulled from an earlier Issue on the subject, as reference for those looking to implement postmaster actions)
Aye, indeed you've run into a known limitation of postmaster transfers: some weapons can conditionally alter your state when transferred from the postmaster - for instance, in this situation, picking up the item you linked to through that DIM bug is setting a value on the server that lets us know this was the first time the user picked up a "superior quality" weapon if they haven't picked one up before - but on the BNet side, we don't have an understanding of what these side effects can do and the ripple effects they can have.
For instance, even in this seemingly benign example, what happens if that flag gets set for the first time and you're not playing? Is there important tutorial UI that a user might miss out on? (in this case, there isn't - it's triggering some benign internal mechanism, but there's no consistent way for us to know what is benign versus what has actual interesting/undesirable(?) side effects) This is why our "doesPostmasterPullHaveSideEffects" is so aggressive, and will indeed sometimes hit false positives. We are erring on the side of caution, because we have no way of knowing a priori what side effects some of these actions can have.
I think it will likely be prudent to create a "whitelist" of safe actions: for instance, if the designers feel like this one is safe enough to exclude, then we could add it to a list of potential actions that we're okay with being run as a side effect. But we'll have to be careful, as this whitelist will come with both an ongoing maintenance cost and the possibility that it could have undesired side effects in the future that we'd then not be protecting against. So if we do create a whitelist, it will be in extremely rare cases and only if we feel pretty certain of its harmlessness.
I'll ask around about this one, and then if they feel comfortable about it I'll see about adding a whitelist exemption for this specific side effect. But I can't promise that we will be able to provide it, and you'll definitely want both your users and your fellow DIM developers to know that Postmaster Transfer is aggressively conservative and that sometimes you won't be allowed to transfer an item that otherwise seems benign.