This code will take a dhall file that describes a set of pubsub nodes and the
people we want to be allowed on them and makes reality reflect that.
It's not super careful as of right now, mostly just asserting everything every
time rather than reflecting and patching.
But it does remove people who are currently affiliations and are no longer
specified.
It does not currently remove an entire node if the node is no longer present.
Unsure if that's a thing we want or not...
It also assumes that the configured user themselves has admin authority on the
pubsub server.
Anyway, config looks like:
{
jid = "admin@example.com",
password = "password",
servers = [
{
host = "pubsub.example.com",
nodes = [
{
node = "fancy_node",
access_model = "whitelist",
publishers = ["test2@example.com"],
members = ["riddim@example.com"]
}
]
}
]
}