Luna
6c992588e9
channel.messages: fix insertion into attachments table
...
- channel.messages: add file write
- images: make get_ext and get_mime public functions
- storage: receive app instance instead of db
2018-12-08 23:38:52 -03:00
Luna
b6dd495121
run: register attachments bp
2018-12-08 23:13:48 -03:00
Luna
2632d033fa
all: add GPL header
2018-12-07 02:14:58 -03:00
Luna
e2720a4084
embed.sanitizer: fix double-slash on path
...
- run: add app.session
2018-12-05 03:08:54 -03:00
Luna
5db633b797
channel.messages: use sanitize_embed
...
- embed: add sanitizer module
- embed.schemas: add to_json to EmbedURL
- utils: add custom JSON encoder
- run: use custom JSON encoder
- gateway.websocket: use custom JSON encoder
2018-12-04 21:45:14 -03:00
Luna
df382a7a5f
user: add fake_store bp
...
this should solve problems with 404's.
2018-11-30 17:33:23 -03:00
Luna Mendes
2852f57f96
static: add handler for index using jinja / render_template
...
- static: add index.html
- run: remove index handler
2018-11-21 21:31:11 -03:00
slice
10d4771c0c
Add X-Debug-Options as an allowed header
2018-11-20 12:29:30 -08:00
Luna Mendes
3e28501bdb
run: replace other/peer to user
...
- discord_endpoints: remove ambiguity on PUT/PATCH Modify Channel route
2018-11-20 14:52:35 -03:00
Luna Mendes
437f8de643
run: replace member/banned/target to user in api_index
2018-11-20 14:48:44 -03:00
Luna Mendes
deddc82360
run: add api compliance score
...
Closes #21 .
2018-11-20 14:32:32 -03:00
slice
2f377e1d69
return status code 500 when handling http 500s
2018-11-18 23:44:48 -08:00
Luna Mendes
6921f3b6b1
run: remove unused import
...
- static.invite_register: retab
2018-11-19 01:47:35 -03:00
Luna Mendes
2ff7f796fc
run: add static blueprint to set_blueprints
...
- run: remove old handler for /register
2018-11-19 01:40:31 -03:00
Luna Mendes
e949dbdc3f
blueprints.auth: add *dummy* POST /api/v6/auth/register_inv
...
- litecord.schemas: add REGISTER, REGISTER_WITH_INVITE
- run: add GET /register
- add static/invite_register.html
2018-11-18 19:24:17 -03:00
Luna Mendes
339d1b0c8b
blueprints: add nodeinfo blueprint
2018-11-18 17:04:31 -03:00
Luna Mendes
0aa679677f
user_storage: add UserStorage.get_user_guilds
...
So that we're consistent.
- gateway.websocket, presence: change to UserStorage for
get_user_guilds
2018-11-17 18:41:54 -03:00
Luna Mendes
64af426035
guild: add emoji blueprint
...
- storage: add get_emoji, get_guild_emojis
2018-11-17 17:06:27 -03:00
Luna Mendes
a7f8852324
test.test_websocket: add test_ready_fields
...
- RatelimitManager: add a test flag to overwrite _ws.connect ratelimit
2018-11-17 04:09:22 -03:00
Luna Mendes
00c976c552
gateway.gateway: add default args when connecting
...
- gateway.gateway: pass app instance instead of a 7-tuple
2018-11-17 02:20:48 -03:00
Luna Mendes
11d4b54f87
split Storage into UserStorage
...
this should help with the amount of methods being tossed in the Storage
class.
2018-11-17 02:14:10 -03:00
Luna Mendes
0ec615f3bd
user.billing: add create_payment
...
- user: add billing_job for recurring payments (monthly or weekly)
- user.billing: make main functions accept external db object
- user.billing: fix get_payment's fields
- litecord: add job module with JobManager
2018-11-14 19:49:36 -03:00
Luna Mendes
b9ef4c6d8c
litecord.blueprints: split users bp into user sub-bp
...
- blueprints.user: add biling bp
- blueprints.user: add settings bp
- schema.sql: add user_payment_sources, user_subscriptions,
user_payments
2018-11-14 03:43:40 -03:00
Luna Mendes
5480a669a3
all: add guild icon support
...
- fix update_guild's methods
- fix update_guild's sql statements
- litecord: add images module
- schemas: add splash to GUILD_UPDATE
- schemas: add validate to INVITE
- manage.cmd.migration: add script 2
2018-11-13 21:12:40 -03:00
Luna Mendes
e54bcc312a
blueprints: add icons blueprint
...
- Pipfile: add pillow
2018-11-13 17:33:28 -03:00
Luna Mendes
40f7efd1df
tests: add test_ratelimits, test_gateway
...
- tests: use event_loop fixture instead of get_event_loop
- tests: move custom fixtures to conftest
2018-11-13 01:10:43 -03:00
Luna Mendes
1711192ac9
tests.test_main: fix testing
2018-11-12 17:39:30 -03:00
Luna Mendes
62332e15c3
run: add set_blueprints
2018-11-12 04:26:16 -03:00
Luna Mendes
7b75202311
tests: add basic test
2018-11-12 04:10:31 -03:00
Luna Mendes
a1a914dc87
add manage.py
2018-11-06 17:42:27 -03:00
Luna Mendes
22fe0f07c6
channel: create channel.pins blueprint
...
- schemas: add CHAN_UPDATE and CHAN_OVERWRITE
2018-11-05 00:15:59 -03:00
Luna Mendes
da8b049174
channel.messages: add permission checks
...
this commit only adds permission checking to most parts of the
message endpoints.
- channel.messages: fix extract_limit's default param
- channel.messages: check send_messages, mention_everyone, send_tts_messages
- channel.messages: check manage_messages
- blueprints.checks: add guild_perm_check, channel_perm_check
- errors: add error_code property, change some inheritance
- permissions: fix base_permissions
- storage: fix get_reactions
- storage: remove print-debug
- run: use error_code property when given
2018-11-04 19:55:21 -03:00
Luna Mendes
a96b9c5e7f
ratelimits.handler: five better retry_after and global flag
...
- run: add X-RateLimit-Global and Retry-After headers
2018-11-04 02:23:26 -03:00
Luna Mendes
33f893c0ff
all: add ratelimit implementation
...
haven't tested yet, but it should work in theory.
- gateway.websocket: add the 3 main ws ratelimits
- litecord: add ratelimits package
- ratelimits.main: add implementation
- run: add app_set_ratelimit_headers
2018-11-04 02:06:40 -03:00
Luna Mendes
b17cfd46eb
run: add dummy ratelimiting handler
2018-11-03 22:48:36 -03:00
Luna Mendes
69fbd9c117
gateway.state_manager: send OP 7 Reconnect to clients
...
- gateway.websocket: check StateManager flags on new connections
- gateway.websocket: cancel all tasks on GatewayWebsocket.wsp.tasks
- run: call StateManager.gen_close_tasks() and StateManager.close() on
app shutdown
2018-11-03 21:58:51 -03:00
Luna Mendes
db7fbdb954
run: load channel_reactions bp
2018-11-02 20:11:23 -03:00
Luna Mendes
f2d5913672
blueprints: split channels to channel.messages bp
2018-10-28 17:29:43 -03:00
Luna Mendes
9aa9b3839b
guild.mod: add GET /guilds/:gid/prune
...
- users: fix get_me_guilds
- run: fix importing mod blueprint
2018-10-27 23:32:50 -03:00
Luna Mendes
65b47e74bf
guild: add mod blueprint
...
to keep moderation-related routes in a single blueprint
2018-10-27 22:27:05 -03:00
Luna Mendes
43b0482581
blueprints.guild: split blueprint into channels, members, roles
2018-10-27 02:04:47 -03:00
Luna Mendes
ef5d4f30e1
blueprints: create dms blueprint
...
It should be safe for instances to run the `schema.sql` file and update.
- blueprints.users: s/GUILD_SETTINGS_UPDATE/USER_GUILD_SETTINGS_UPDATE
- storage: fix get_guild_settings returning a dict instead of a list
- schema.sql: fix types and syntax
2018-10-19 16:21:33 -03:00
Luna Mendes
b7f0bd1bb4
run: pass app instance to EventDispatcher
...
this should help with future DM channel pub/sub, as we'll
have to query the `dm_channel_state` table.
2018-10-11 16:52:15 -03:00
Luna Mendes
c7923da124
relationship support!
...
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
2018-10-02 03:43:57 -03:00
Luna Mendes
bff5700d06
blueprints.users: add user setting patch impl
...
- schemas: add explicit type
- schemas: add USER_SETTINGS
- run: make Access-Control-Allow-Methods the same as Allow header when
possible
2018-09-29 23:43:02 -03:00
Luna Mendes
624eb6eb0e
blueprints.users: use Storage.get_user_settings
...
paving the way for user settings support.
- storage: add Storage.get_user_settings
- storage: add methods to fetch with json/jsonb codecs enabled
2018-09-29 23:10:42 -03:00
Luna Mendes
e7d97ecdef
run: have a fallback when Origin header is missing
2018-09-27 23:25:23 -03:00
Luna Mendes
92f6e3cf75
add invite usage
...
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
2018-09-27 23:10:30 -03:00
Luna Mendes
dc62de37b2
basic invites
...
- add invites blueprint
- add POST /api/v6/channels/<channel_id>/invites
- add GET /api/v6/invites/<invite_code>
- schema: add INVITE
- storage: add get_member_ids, get_invite, get_invite_extra,
get_invite_metadata
2018-09-26 20:29:22 -03:00
Luna Mendes
14d3149f50
storage: add presence fetching on get_guild_extra
2018-09-22 22:00:25 -03:00