MIM-2712 Update pubsub utilities#290
Merged
Merged
Conversation
- Remove top-level from/to attributes from PubSub stanza helpers
- Allow undefined PubSub node names to build malformed requests
- Drop {pep, Node} and {NodeAddr, Node} PubSub targets
- Remove unsupported {Var, Type, Value} form field tuples
- Distinguish empty submitted forms from omitted forms
- Add publish_raw/3 for custom publish request bodies
- Accept server JIDs in affiliation payloads
f50a837 to
87aa8da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main goal is to allow more detailed PubSub / PEP tests including error conditions.
API changes
fromortoattributes. Function arities were reduced whereUserwas only used forfrom, orNodeAddrwas only used forto.undefined, allowing helpers to omitnodeattributes and build malformed requests without manual XML manipulation.{pep, Node}and{NodeAddr, Node}targets are no longer supported; helpers now take the PubSub node name directly.{Var, Type, Value}tuple shape; use{Var, Value}or{Var, [Value]}.Typewas actually unused.[]fromundefined:[]sends an empty submitted form, whileundefinedsends no form. This allows handling both cases.publish_raw/3.Implementation notes
escalus_stanza:x_data_form/2andfield_el/3.