Server Subscriptions

Note

If you’re not using user account, you may skip reading this. Otherwise, continue reading.

Note

Subscriptions have no effect on bot accounts.

Server subscriptions were added and announced on 19 Jun 2024 because of official Stoat API instance kept going down.

Server subscriptions is way to limit stoat.UserUpdateEvent’s from users that do not have relationship or have open DM with the connected user.

Since they don’t appear to be changed, this page documents them in detail.

In essence, since library does not provide an automatic way to manage subscriptions, you’ll need to do it manually through subscribe() method.

Users are automatically subscribed to all users they have relationship or open DM with, and all recipients from all groups the user in.

Subscriptions are automatically expired within 15 minutes.

A single WebSocket connection can have only up to 5 active subscriptions.

Note

This note is relevant only to client developers.

You should subscribe only if the client is in focus.

You should aim to subscribe at most every 10 minutes per server.