- 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
also add name to group_dm_channels, and a group_dm_members table.
SQL for moving to latest schema:
```sql
DROP TABLE dm_channels;
DROP TABLE group_dm_channels;
DROP TABLE channel_overwrites;
DROP TABLE guild_features;
```
Then rerun `schema.sql`.
- schema.sql: revamp channel_overwrites table
- schema.sql: add features table
- schema.sql: make guild_features use the features table
Drop the unused tables:
```sql
DROP TABLE message_attachments;
DROP TABLE message_reactions;
DROP TABLE channel_pins;
```
Rerun `schema.sql` to recreate them with the proper constraints.
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
Mostly adding guild_id to some events. It isn't complete support for
them, but its some of the way there.
- storage: give guild_id on get_message
- gateway.websocket: decrease logging for some stuff
- a debug log for the whole packet is still there for development
reasons, maybe i'll put it on a config option.
- gateway.websocket: dispatch an offline presence when the user has no
connections tied to them anymore
unicode!
sql for instances to upgrade:
alter table users alter column username type text;
alter table guilds alter column name type text;
alter table members alter column nickname type text;
alter table roles alter column name type text;
alter table bans alter column reason type text;
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
- handle BadRequest instead of passing raise_err=False
- handle status.activities
- ready: call update_status BEFORE subscribing and dispatching_ready
presence:
- better presence object on guild_presences
schema:
- handle activities, change required to false in game