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
storage:
- don't use SELECT * when get_guild'ing
- use field::text instead of the str() call madness
- simplify get_member_data_one
- fix parent_id being an int on get_channel_data
- add Storage.get_role
- better mention resolving on get_message
- remove Storage.get_all_dms
- presences: add PresenceManager.friend_presences
- blueprints.auth: fix resend route
- pubsub: add DispatcherWithState to decrease amount of
repeated code between GuildDispatcher and ChannelDispatcher
- storage: fix relationship id field
sql for instances:
```sql
-- remove old nitro column
ALTER TABLE users DROP COLUMN premium;
-- add new nitro column
ALTER TABLE users ADD COLUMN premium_since timestamp without time zone DEFAULT NULL;
```
- blueprints.checks: fix party fetching
- blueprints.users: fix try_dm_state
- blueprints.users: fix create_dm
- blueprints.users: fix create_group_dm being used for 1-on-1 dm
- gateway.websocket: add support for pure zlib
- schemas: fix CREATE_GROUP_DM
- storage: fix _filter_recipients, get_channel and get_dms