haven't tested yet, but it should work in theory.
- gateway.websocket: add the 3 main ws ratelimits
- litecord: add ratelimits package
- ratelimits.main: add implementation
- run: add app_set_ratelimit_headers
- gateway.websocket: check StateManager flags on new connections
- gateway.websocket: cancel all tasks on GatewayWebsocket.wsp.tasks
- run: call StateManager.gen_close_tasks() and StateManager.close() on
app shutdown
It should be safe for instances to run the `schema.sql` file and update.
- blueprints.users: s/GUILD_SETTINGS_UPDATE/USER_GUILD_SETTINGS_UPDATE
- storage: fix get_guild_settings returning a dict instead of a list
- schema.sql: fix types and syntax
friendships and blocks are possible, however presence code isn't ready
to handle presences of people who are friends.
SQL for instances, this is going to fix bad timestamps on the messages:
```sql
ALTER TABLE ONLY members ALTER COLUMN joined_at SET DEFAULT (now() at time zone 'utc');
ALTER TABLE ONLY messages ALTER COLUMN created_at SET DEFAULT (now() at time zone 'utc');
ALTER TABLE ONLY invites ALTER COLUMN created_at SET DEFAULT (now() at time zone 'utc');
```
After that, rerun the schema.sql file to have the new relationships
table.
- blueprints: add relationships blueprint
- enums: add RelationshipType
- storage: add get_relationships
- storage: fix bug on lazy guild changes and messages
- schemas: return validator.document instead of reqjson
- gateway.websocket: use Storage.get_relationships
users can now join guilds!
invites:
- add GET /api/v6/invites/<invite_code>
- add DELETE /api/v6/invites/<invite_code>
- add GET /api/v6/guilds/<guild_id>/invites
- add GET /api/v6/channels/<channel_id>/invites
- add POST /api/v6/invite/<invite_code>
storage:
- add verification_level to invites
- add empty invite.guild.features
gateway.state_manager:
- add StateManager.user_states
- give a dummy offline state on guild_states
- this makes it possible for people to see offline members even when
those members never logged in (since the would have no state being
reffered to them)
- gateway.websocket: use get_member_ids on lazy guild handler
- auth: add GET /api/v6/auth/consent-required
- dispatcher: add dispatch_user_guild and dispatch_user
- run: use Origin header on Access-Control-Allow-Origin
Lots of changes to get it working.
One day changes will be able to be small enough to be split across
commits.
- enums: use enum.Enum, make EasyEnum subclass
- enums: add ActivityType, ActivityFlags, StatusType
- gateway.state: use 128 random bits instead of 256
- gateway.state: add MAX_STORE_SIZE in PayloadStore and check it when
adding a new payload
- gateway.websocket: add GatewayWebsocket.update_status
- presence: add PresenceManager.dispatch_guild_pres and
PresenceManager.dispatch_pres
- schema: add snowflake, activity_type, status_external types
- schema: add GW_ACTIVITY, GW_STATUS_UPDATE
- storage: fix _channels_extra and fixes for ChannelType as enum instead of
class
- state_manager: add StateManager.guild_states
- add PresenceManager in the presence module
- fix get_user_guilds not returning ints
- gateway: add dummy handler for op 4
- gateway: add hazmat implementation for op 14
- run: keep websockets logger on INFO
- run: add more headers on app_after_request
It is clunky when sending messages as Atomic, nor we have proper channel
management, but it works.
- dispatcher: add sub_many
- errors: add failsafe on LitecordError.message
- errors: add ChannelNotFound
- gateway.websocket: add dispatcher to WebsocketObjects
- schemas: add regexes for mentions
- storage: add get_channel, get_message