# References

**WebSub** original name was **PubSubHubbub**. In 2017, W3C decided the original name was an idiot and rightfully renamed it to **WebSub**. I compeletely agree.

Best references about the subject:

* <https://indieweb.org/How_to_publish_and_consume_WebSub>&#x20;
* <https://www.ably.io/concepts/websub>&#x20;
* <https://nordicapis.com/websub-common-cases-and-implementations/>

I noticed that in every flow diagram on WebSub, one flow is always not drawn in the diagram. It is that flow where the `subscriber` sends back the `hub.challenge` string back to the `hub` via `GET` protocol.  Very unusual how several authors does it in the same way.

**Key Points:**

First, a `subscriber` reads an html content and likes the content. The `subscriber` then wants to be notified of updates in the content. The `subscriber` seeks the `hub` that the html content is affiliated to in two places:

* In HTML headers&#x20;
* In HTML content

Once the `hub` is found, a subscription is sent to the `hub`. The `subscriber` sends a `POST` message to the hub , with these headers:

* hub.mode="subscribe"
* hub.topic="<http://abc.com>"
* hub.callback="<http://my.site.com/cb/314159265358979323846>"

The `hub` checks if the `topic` exists and if so, response back with `HTTP 202 ACCEPTED`. Furtheremore, the `hub` sends a `GET` message to the subscriber\`s callback URL and passing the below stuff as query string:

* hub.mode=subscribe
* hub.topic=.....same...
* hub.challenge=xoeusth3coeush33

The `subscriber` should reply with a `GET` and a body of pure string, the same secret sent by `hub` . This completes the subscription process.

**When Content Changes**

When the content changes, the first person who is aware of this is of course the publisher. The publisher notifies the `hub` via POST message with:

* hub.mode="publish"
* hub.url=\<YOU FEED URL>

&#x20;the `hub` notifies every subscriber via `POST` message where the body is the content or diff of content.&#x20;

How the hell do we find out what valid `hub.topic` are there that belongs to a `hub` ???
