======
Subscription status can be checked by the subscriber by making an HTTP
GET request to the hub URL. This request has the following query
string arguments appended:
hub.mode
REQUIRED. The literal string "query"
hub.topic
REQUIRED. The topic URL associated with the subscription.
hub.callback
REQUIRED. The subscriber's callback URL associated with the subscription.
hub.secret
OPTIONAL. The hub.secret value associated with the subscription, if any.
If the request is successful, the hub MUST respond with HTTP 200 OK
and a text/plain response body containing a string representing one of
the following subscription states:
none
The hub has no record of a subscription to hub.topic for the
subscriber at hub.callback
pending
The hub has confirmed the subscription request but is awaiting
approval from the owner of hub.topic
subscribed
The hub is publishing changes of hub.topic to the subscriber at hub.callback
Any other responses MUST be interpreted by subscribers as meaning that
the hub does not support the query mode or is unwilling to provide
information regarding the subscription in question.
Hubs SHOULD NOT violate the privacy of subscribers; unless the
subscriber specified a hub.secret or the hub is operating in
diagnostic mode, the hub MUST respond with HTTP 403 Forbidden and an
empty response body.
But should we also consider what happens when a subscriber gets
unsubscribed (by any party)? (E.g. 'blocked'?)
Just asking..
a
Definitely; my thought is that this is mostly interesting for testing
and debugging purposes. Perhaps some wording to allow the hub to
optionally not support this feature (e.g., if the hub doesn't want to
deal with these requests, it should return HTTP 501)?
b.
I used the XMPP XEP 60 states, minus "unconfigured" since PSHB doesn't
have a concept of configuring subscriptions. Since XEP60 is pretty
exhaustive at this point, I didn't feel the need to look further. ;-)
b.