Commit Graph

1040 Commits

Author SHA1 Message Date
Luna a76460bea1 varied fixes due to sed fuckups 2020-01-06 22:55:20 -03:00
Luna 3481165bc5 everything: use winter 2020-01-06 21:38:29 -03:00
Luna 9a0a0c5a59 pipfile: add winter 2020-01-06 21:35:21 -03:00
Luna bc3fa37d63 guild.members: use context manager for pool conn acquire 2019-11-15 20:37:10 -03:00
Luna e917982f6d guilds: remove unused import 2019-10-26 12:00:31 -03:00
Luna 44315b0845 move add_member to common.guilds
this decreases copy-pasting of the 'INSERT INTO members' line, and
add_member gets a `basic` kwarg to remove gateway side-effects

 - errors: add 40007 error code to ERR_MSG_MAP
 - invites: use 40007 and 10006 error codes
2019-10-26 11:57:43 -03:00
Luna 27b5836132 invites: check maximum invite count 2019-10-26 11:52:26 -03:00
Luna 23034aadbd errors: add 30016 err code to ERR_MSG_MAP 2019-10-26 11:49:54 -03:00
Luna 6dc591e853 allow presences boolean on request guild members
see 5454bdf4e0 for source
2019-10-26 11:47:12 -03:00
Luna 57220179bc Merge branch 'enhance/refactor-and-move-internals' into 'master'
Refactor and move internals

See merge request litecord/litecord!47
2019-10-25 19:52:31 +00:00
Luna ca7f1eae6b user.billing: fix import 2019-10-25 16:44:39 -03:00
Luna 7c3e9ec2c7 move create_guild_settings to common.guilds 2019-10-25 16:19:18 -03:00
Luna c765cd7fe0 fix imports 2019-10-25 16:01:48 -03:00
Luna 91d70d2c41 fix imports to common.users 2019-10-25 13:52:33 -03:00
Luna f1e6baffd2 move user functions to common.users 2019-10-25 13:48:22 -03:00
Luna ffa244173c messages: remove double import 2019-10-25 13:41:11 -03:00
Luna b41d3b6f36 guilds: use common, remove delete_guild() from it 2019-10-25 13:39:22 -03:00
Luna 2ebb94f476 messages: use common/utils functions 2019-10-25 13:36:02 -03:00
Luna a67b6580ba make other blueprints use common, etc 2019-10-25 13:33:52 -03:00
Luna 1efc65511c create litecord.common 2019-10-25 13:31:47 -03:00
Luna 71a058e542 Merge branch 'master' into enhance/refactor-and-move-internals 2019-10-25 12:00:47 -03:00
Luna ccf79c9186 fix op code 23 handler name 2019-10-25 12:00:31 -03:00
Luna ab89b70ddc fix create_user call 2019-10-25 11:33:19 -03:00
Luna 2bc7bb3924 fix some calls not needing app 2019-10-25 11:31:12 -03:00
Luna f6f50a1cff remove app param from billing functions 2019-10-25 11:23:40 -03:00
Luna ce04ac5c5f remove app param from guild_region_check() 2019-10-25 10:52:46 -03:00
Luna e0a849fa6a fix callers of embed functions due to param changes 2019-10-25 10:49:35 -03:00
Luna 2024c4bdf8 remove app parameters from embed functions 2019-10-25 10:40:26 -03:00
Luna 2780ca4175 guilds: remove app_ param from delete_guild() 2019-10-25 10:24:20 -03:00
Luna 420646e76f revamp how Flags works
instead of pulling a hack and injecting from_int() in `__init_subclass__`, we
just make an actual function, and cache the wanted attributes in the subclass
at its creation

this fixes statis analyzers claiming from_int() doesn't exist on
subclasses, for good reason, as they'd be turing-complete to do so, lol

 - auth: fix some mypy issues about reusing same variable
2019-10-25 10:00:35 -03:00
Luna 7278c15d9c gateway.websocket: remove WebsocketObjects
we can just use the app object directly.
2019-10-25 09:41:52 -03:00
Luna 7c878515e9 make JobManager.spawn copy current app context 2019-10-25 09:38:48 -03:00
Luna 4286b5d283 manage.cmd.users: fix create_user call 2019-10-25 09:01:18 -03:00
Luna 2674e76e62 blueprints.auth: fix create_user call 2019-10-25 09:00:21 -03:00
Luna 4d87256cc3 tests.conftest: use app_context on create_user call 2019-10-25 08:57:45 -03:00
Luna a3f793a211 remove some app and db params/kwargs from auth functions 2019-10-25 08:56:07 -03:00
Luna b0ef3c4d0c tests.conftest: use app_context for delete_user call
- admin_api.users: remove app arg passing
2019-10-25 08:51:52 -03:00
Luna f54c002a31 remove app kwargs from delete_user and mass_user_update
- manage.cmd.users: don't send updates when deleting users

the rationale for this is that while we have an app.dispatcher, it is
fully empty since we created a mock just for manage.py operations. to
have proper side-effects occouring on the actual main app, we'd need to
implement some kind of IPC, and i'm not up for that task, yet.
2019-10-25 08:47:04 -03:00
Luna 78b45b022a manage: make FakeApp.config be the same thing as Quart.config 2019-10-25 08:41:49 -03:00
Luna c44e184e6e enable FakeApp to create Quart instances
- use a wrapper for app_context inside manager command handlers
2019-10-25 08:34:20 -03:00
Luna 0cc1062c52 flake8 pass
- fix test_empty_embed not actually reporting on empty embeds
2019-10-25 08:06:26 -03:00
Luna 1accbba002 tox: use black and flake8, allow posargs on pytest 2019-10-25 07:54:57 -03:00
Luna 83a1c1ae29 black fmt pass 2019-10-25 07:27:50 -03:00
Luna 0bc4b1ba3f manage.cmd.users, tests.conftest: follow new kwargs for delete_user 2019-09-30 10:55:12 -03:00
Luna 586256ed65 users: make delete_user receive app instance 2019-09-30 10:53:42 -03:00
Luna f6a5dfe3d9 users: change area of concern for the gw side-effects 2019-09-30 10:49:02 -03:00
Luna 3e15f9a518 users: send user and presence updates for deleted user 2019-09-30 10:43:30 -03:00
Luna 9c2e04a17c gateway.websocket: add placeholder handler for opcode 23 2019-09-29 22:53:07 -03:00
Luna eb8c7ba82f pipfile: update deps 2019-09-16 15:26:09 -03:00
Luna ab1d07d6c3 README: add mediaproxy as optional requirement
- config.example.py: signal None as valid value for MEDIA_PROXY
2019-09-16 14:56:17 -03:00