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
Luna
93237e34f8
add bulk delete endpoint
...
- schemas: add BULK_DELETE
2019-08-27 22:14:38 -03:00
Luna
c10806e0de
run: add support for x-ratelimit-precision header
2019-08-13 12:24:03 -03:00
Luna
b8a4125482
permissions: add stream permission
2019-08-13 12:11:01 -03:00
Luna
deb8a67f91
gitlab-ci.yml: remove tox from main pipeline
...
tox still stays as a "dev-oriented" testing tool.
2019-08-03 16:46:53 -03:00
Luna
27ec018bf5
guild.mod: use request.args on guild prune
...
- schemas.GUILD_PRUNE: add default parameter to days, add compute_prune_count
2019-08-02 11:59:46 -03:00
Luna
cf16a14e94
Merge branch 'support/embed-links' into 'master'
...
Embed Links permission support
Closes #49
See merge request litecord/litecord!43
2019-07-23 19:34:42 +00:00
Luna
fa1151c759
fix spawn_embed's app and remove where clauses for conflict row
2019-07-23 16:22:38 -03:00
Luna
2086ee2849
channels: fix inferred constraint name
2019-07-23 15:46:00 -03:00
Luna
db00724379
fix channel overwrite creation and constraints
2019-07-23 15:40:23 -03:00
Luna
39fd7577b8
channel.messages: add checks for Embed Links permission
2019-07-23 14:52:26 -03:00
Luna
68e0ab186c
Merge branch 'enhance/tests' into 'master'
...
enhance tests
Closes #51
See merge request litecord/litecord!42
2019-07-22 15:08:12 +00:00
Luna
f7de5c5596
tests.common: remove login() and get_uid()
2019-07-21 13:02:19 -03:00
Luna
a26f665c81
rm tests/credentials.py
2019-07-21 13:00:42 -03:00