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
Luna
4d7b8f519f
users: properly close underlying websocket when disconnecting
2019-09-13 21:45:08 -03:00
Luna
2c7b3f391e
manage.cmd.users: s/disciminator/discrim
2019-09-13 21:39:22 -03:00
Luna
9346c5c52c
embed.sanitizer: check for MEDIA_PROXY being None
2019-09-13 18:52:20 -03:00
Luna
3973ca863c
gateway.websocket: cast user_ids to List[Union[int, Any]]
...
this finishes the implementation, as before it was simply List[Any]
(List[str] on well-formed requests), which means Any was always being
passed to get_member_multi, which only works with ints.
2019-09-07 12:13:21 -03:00
Luna
f1ca177118
storage: add guild.preffered_locale hardcoded field
2019-09-02 16:18:23 -03:00
Luna
96591c1f20
Merge branch 'message-flags' into 'master'
...
add message flags
Closes #57
See merge request litecord/litecord!46
2019-09-01 22:32:49 +00:00
Luna
ef6361dbda
channels: update local message var when changing flags
...
- embed.messages: propagate payload.flags when updating msg embeds
- enums: fix typo
- channels: fix flag helper functions
- storage: only fill res.member when user_id is given
- storage: sentinel value is 0 instead of none for flags removal
2019-09-01 19:18:54 -03:00
Luna
e0d253f36f
add message flags updating on suppress embeds
2019-09-01 18:03:29 -03:00
Luna
63ab8ea064
add messages.flags column
2019-09-01 17:31:24 -03:00
Luna
a8f226e2c2
Merge branch 'bulk-delete' into 'master'
...
add support for message bulk delete
See merge request litecord/litecord!45
2019-09-01 18:38:46 +00:00
Luna
9b1f5cbb60
channels: use a set for message_ids
...
- channels: check result of db call on bulk delete
2019-09-01 15:30:21 -03:00
Luna
1b4c39fe23
errors: check args[0] for integer values and convert to ERR_MSG_MAP
...
- channels: s/weeks/days
- schemas: handle reqjson being None on validate()
2019-09-01 15:25:28 -03:00
Luna
30d4c258d1
Merge branch 'master' into bulk-delete
2019-08-28 15:29:23 -03:00
Luna
00f7e076ac
channels: add checking of message id's age in bulk delete
2019-08-28 15:22:34 -03:00
Luna
464ca2cc95
pipfile: update depedencies
2019-08-27 22:55:13 -03:00
Luna
e4386e8656
channels: add bulk delete sql query
...
- schemas: add minlength, maxlength to BULK_DELETE
2019-08-27 22:32:38 -03:00