Commit Graph

837 Commits

Author SHA1 Message Date
Luna 76048f3abc docs/admin_api.md: add draft for upcoming endpoints 2019-03-16 16:00:21 -03:00
Luna 681dee4306 Merge branch 'guild-features' into 'master'
Guild features

Closes #37 and #36

See merge request litecord/litecord!25
2019-03-15 19:37:26 +00:00
Luna e8c55ac2a9 docs/admin_api.md: add supported features 2019-03-15 16:17:18 -03:00
Luna 276fc4c093 docs/admin_api.md: add Guilds and Guild features sections 2019-03-15 16:14:44 -03:00
Luna 30be092c3c docs/admin_api.md: update headings 2019-03-15 16:09:52 -03:00
Luna b90089a784 users: remove unused import 2019-03-15 04:43:26 -03:00
Luna 5c0dfcc9b1 guilds: add support for icon hash for j.splash
- guilds: fix guild icon being set to j.splash
 - schemas: handle splash being icon hash
2019-03-15 04:39:09 -03:00
Luna 5bfafa2a29 storage: expose banner and description on invites 2019-03-15 04:32:02 -03:00
Luna b6e21a2501 guilds: handle banner changes like user avatar changes
just like user avatars, the client can just send the icon hash, we need
to check that first beforehand.

 - guilds: add description update
 - utils: move to_update() from blueprints.users to there
2019-03-15 04:29:35 -03:00
Luna 44b81ea2f6 guilds: fix guild update icon call
- images: add support for splash and banner
 - add jpeg check when converting extension
2019-03-15 04:17:57 -03:00
Luna 7cd95d3f94 gateway.websocket: fix ETF encoding with a json pass
- icons: fix get guild banner handler args
2019-03-15 03:54:40 -03:00
Luna 2bc3817a4e guilds: fix region update vip check 2019-03-15 03:46:12 -03:00
Luna 448b74f91b schemas: add GUILD_UPDATE.{banner, description}
- storage: add banner and description to get_guild fetch
 - migration: add 14_add_guild_description.sql
2019-03-15 03:41:51 -03:00
Luna 79735eedf8 guilds: add (untested) impl for splash and banner
this finishes all theoretical implementations for features.

Closes #36 and #37.
2019-03-15 03:34:49 -03:00
Luna 60ccd8db0b guilds: add size=(128, 128) when updating guild icon 2019-03-15 03:16:17 -03:00
Luna 1987db11e4 guilds: decouple icon put logic into a func 2019-03-15 02:41:30 -03:00
Luna 060e91907d icons: properly remove unused vars 2019-03-15 01:26:27 -03:00
Luna c2c3ea3091 icons: remove double get_guild_splash handler
- icons: remove print debug
2019-03-15 00:08:41 -03:00
Luna 5862dce922 icons: add getters for splash and banner
- fix channel-icons scope fetch
2019-03-15 00:01:49 -03:00
Luna 8605e1f59f Merge branch 'master' into guild-features 2019-03-14 16:23:38 -03:00
Luna e6e442f112 schemas: enable nullable for region fields
Closes #40.
2019-03-14 16:18:44 -03:00
Luna 47db480209 register: properly handle missing j.invite
- schemas: fix 80col line breaks
2019-03-13 22:59:27 -03:00
Luna 1ad328904d admin_schemas: move FEATURES schema to there 2019-03-13 18:35:01 -03:00
Luna a12c63a7bf add impl for VIP_REGIONS
(untested)

 - lvsp_manager: add Region, and store vip region status in it
 - lvsp_manager: add LVSPManager.region
2019-03-13 18:28:48 -03:00
Luna 977fa95ff2 admin_api.features: delete vanity invites when guild loses feature
- guilds: make _vanity_inv -> vanity_invite exportable function
2019-03-13 05:07:10 -03:00
Luna 6763f2c501 guilds: add VANITY_URL feature check when editing vanity 2019-03-13 05:04:48 -03:00
Luna afcdd145f4 emoji: add MORE_EMOJI feature support
bumps emoji limit to 200 for both static and animated, needs more
looking.

 - storage: add Storage.has_feature
2019-03-13 05:03:26 -03:00
Luna 5c51894807 guilds: add failsafe check for same invite 2019-03-13 04:49:50 -03:00
Luna f0d4c84e68 guilds: add implementation for vanity invites
I'm not proud of it, especially that we couldn't use much SQL power and
things are laid off to Storage calls. It works, though

 - schemas: add VANITY_URL_PATCH
2019-03-13 04:48:25 -03:00
Luna 633cd730c0 guilds: add basic vanity urls
- add vanity_invites table
2019-03-13 04:28:23 -03:00
Luna 0dbfb3a210 admin_api.features: dispatch GUILD_UPDATE on feature changes
- storage: fix typing on get_guild_full
2019-03-13 04:09:43 -03:00
Luna 16e583179c schemas: fix coerce
- run: change features_admin base to /admin/guilds
2019-03-11 02:12:09 -03:00
Luna 4bb3cad43e migration.scripts: add NOT NULL and DEFAULT to guilds.features 2019-03-11 02:04:07 -03:00
Luna 87781c4606 admin_api.features: remove unused import 2019-03-11 01:45:49 -03:00
Luna 65b4b28d89 schemas: use coerce to Feature instead of guild_features type
cleaner to write code for.

 - admin_api.features: support that
2019-03-11 01:43:11 -03:00
Luna c325543242 enums: move Feature to EasyEnum
- schemas: add validator for guild_features type
2019-03-11 01:40:18 -03:00
Luna 2c1c384409 admin_api.features: make features input as a list
- add PATCH /:id/features
 - enums: add Feature enum
 - schemas: add FEATURES
 - storage: add Storage.guild_features
 - types: add return type to timestamp_
2019-03-11 01:36:52 -03:00
Luna 073f47e0f5 add draft for features_admin and add guilds_admin 2019-03-09 04:09:55 -03:00
Luna a04b3acfaa storage: add guild.features in get_guild
- remove features and guild_features tables
2019-03-09 03:27:12 -03:00
Luna fa73e90170 Merge branch 'voice' into 'master'
Voice: Basics

See merge request litecord/litecord!24
2019-03-09 01:59:22 +00:00
Luna 1bf59e3106 lvsp: remove sequence numbers
thinking about it guaranteeing consistency via sequence numbers isn't
really needed when we already have Litecord as a single source of
truth.

plus, it keeps the protocol simple.
2019-03-06 04:04:00 -03:00
Luna 76a8038cb4 lvsp: add docs for voice state create and destroy
finishes all TODOs.
2019-03-06 03:47:40 -03:00
Luna b8c3208fa4 lvsp: remove CHANNEL_UPDATE
bitrate is a client thing. lol

 - lvsp: remove ChannelProperties, same applies to CHANNEL\_REQ
 - voice.manager: remove channel\_properties
2019-03-06 02:19:28 -03:00
Luna b8f5e01106 lvsp: add CHANNEL_REQ.token 2019-03-06 00:44:16 -03:00
Luna a846c57ae8 storage: inject message.member field
required some changes around how we fetch data from the members table,
but it works
2019-03-05 18:31:33 -03:00
Luna 7b4aaabcbf storage: better fix for message.webhook_id
the old fix only works for the return value in message create, where as
it should be in Storage.get_message instead so that the bug doesn't
happen to the other routes
2019-03-05 16:30:38 -03:00
Luna 67ae2385b5 Merge branch 'master' into voice 2019-03-05 16:27:31 -03:00
Luna 899f19b24c gateway.websocket: fix some errors
right now requesting a voice channel won't return ANY voice events back
to the client, causing a visual/behavioral "lock" on the official
client, since there isn't any available voice servers.
2019-03-05 01:35:17 -03:00
Luna 30d9520935 lvsp: remove TODO 2019-03-05 01:18:53 -03:00
Luna d21b3c8f2a lvsp: add "common logic scenarios" 2019-03-05 00:59:37 -03:00