if the everyone role can read the channel, then the member list
will be equivalent to any other list where the everyone role
can read the channel. with this in mind we can generate a "global"
member list directed only for that usecase.
- permissions: add role_permissions
This makes the whole process of generating a member list
easier to understand and modify (from my point of view).
The actual event dispatching functionality is not on this
commit.
- permissions: add optional storage kwarg
This finishes the basics on channel overwrites.
SQL for instances:
```sql
DROP TABLE channel_overwrites;
```
Then run `schema.sql`.
- channels: finish implementations for update_{text,voice}_channel
- storage: fix _overwrite_convert
- schema.sql: use unique constraint instead of primary key in
channel_overwrites
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;
```