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
This finishes basic reaction code (both inserting and putting a reaction).
SQL for instances:
```sql
DROP TABLE message_reactions;
```
Then rerun `schema.sql`
- channel.reactions: fix partial_emoji
- schema.sql: add message_reactions.react_ts and unique constraint
instead of primary key
- gateway.websocket: update users.last_session
SQL for instances:
```sql
ALTER TABLE users ADD COLUMN last_session timestamp without time zone default (now() at time zone 'utc');
```
Add PATCH /api/v6/guilds/:id/roles for multiple position changes for
roles and PATCH /api/v6/guilds/:id/roles/:id for single guild
role changes
- permissions: add int maigc method
- schemas: add ROLE_UPDATE and ROLE_UPDATE_POSITION
Instances should run this SQL to maintain consistency with `schema.sql`
```sql
ALTER TABLE guild_channels DROP CONSTRAINT guild_channels_guild_id_fkey;
ALTER TABLE guild_channels ADD CONSTRAINT guild_id_fkey
FOREIGN KEY (guild_id)
REFERENCES guilds (id)
ON DELETE CASCADE;
```
also simplify a lot of repeated code on the blueprint.
- litecord: add permissions module
for future role code
- schemas: add channel_type, guild_name, channel_name types
- schemas: add GUILD_CREATE schema
- presence: (basic) handle member lists when presence update.
Note that the respective GUILD_UPDATE_MEMBER_LIST doesn't happen
yet. we'll need roles beforehand.
GuildMemberList, as of this commit, can generate a correct list
and handle (some of) the data given in OP 14. The implementation
is still rudimentary and there's a lot of work to finish.
- dispatcher: add LazyGuildDispatcher
- gateway.state_manager: add states_raw to fetch
a single state without uid
- gateway.websocket: remove rudimentary implementation
(moved it to GuildMemberList in litecord.pubsub.lazy_guild)
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