This makes our implementation go off-spec (depends on what you'd even
call a spec, considering lazy guilds are not documented and probably
won't be), but well... *it works*
There are also a lot of print-debugs on this commit, will clean them up.
- pubsub.lazy_guild: filter empty groups out of items list
- pubsub.lazy_guild: check operator's op on Operation.to_dict
- pubsub.lazy_guild: add resync() method to deal with re-SYNCs easily
- pubsub.lazy_guild: fix get_item_index and get_group_item_index
- pubsub.lazy_guild: drop the ops in complex presence updates in favour
of using resync()
- pubsub.lazy_guild: resync on group resorting
- pubsub.lazy_guild: use resync() on role delete
this fixes role_create and role_delete, adds more debug logging
to understand what is going on, etc.
- pubsub.lazy_guild: promote role_update -> new_role when updating to
hoist=True
- pubsub.lazy_guild: promote role_update -> role_delete when updating
to hoist=False
- pubsub.lazy_guild: better handling of unknown group items on
role_delete
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