Commit Graph

941 Commits

Author SHA1 Message Date
Luna Mendes 1e368f8cc9 images: return None on invalid icon data when put()-ing
- guild.emoji: send 400 on invalid icon
2018-11-17 18:21:20 -03:00
Luna Mendes d9a1923e54 images: add bytelimit
- guild.emoji: add 128x128 limit and 128kb limit
 - types: add KILOBYTES
2018-11-17 18:19:47 -03:00
Luna Mendes d3bc826504 blueprints.icons: send none hash when querying emoji
- images: handle hash being none on generic_get
2018-11-17 18:10:54 -03:00
Luna Mendes 1175de1406 guild.emoji: fix args to IconManager.put 2018-11-17 18:07:04 -03:00
Luna Mendes b6f2d5fdd8 storage: s/guild_emojis/guild_emoji table 2018-11-17 18:03:02 -03:00
Luna Mendes 1cef25ffc4 user.billing_job: fix unwanted await due to spawn() being non-coro 2018-11-17 18:01:53 -03:00
Luna Mendes 041791b733 litecord.user_storage: fix get_relationships 2018-11-17 18:00:04 -03:00
Luna Mendes c70dd62306 guild: add implementations for emoji add/update/remove
All icons will be invalidated.

 - images: change icon path model
 - images: handle hashes being NULL, for emojis only needing
    the key
 - schemas: add NEW_EMOJI, PATCH_EMOJI
 - migration.scripts: add 3_drop_constraints_icons_hash
 - schema.sql: drop unique and not null from hash, change primary key in
    icons
2018-11-17 17:52:34 -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 978ad9075e gateway.websocket: fix more Storage -> UserStorage references 2018-11-17 03:10:45 -03:00
Luna Mendes 77c52a5c28 tests.test_websocket: add test_ready 2018-11-17 03:05:54 -03:00
Luna Mendes 069c39d29e tests: add test_websocket.py
- tests.conftest: alter WEBSOCKET_URL as well
2018-11-17 02:51:07 -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 404720c54d user.billing_job: handle CancelledError 2018-11-17 00:03:18 -03:00
Luna Mendes bf661fa237 gateway.websocket: use non-whitespace separators on encode_json
decreases overall bytes needed to send a payload
2018-11-16 17:18:20 -03:00
Luna Mendes bf8eca95b1 gateway.websocket: add GatewayWebsocket.send_op 2018-11-16 17:14:46 -03:00
Luna Mendes 800da730df litecord.jobs: add wrapper for logging errors 2018-11-16 16:54:20 -03:00
Luna Mendes 247523c181 config.example.py: add REGISTRATIONS field to Config 2018-11-16 16:49:56 -03:00
Luna Mendes 109a56db4c config: add REGISTRATIONS config check in register bp 2018-11-16 16:48:32 -03:00
Luna Mendes 2f972fc735 storage: use get_member_data_one 2018-11-15 18:36:11 -03:00
Luna Mendes 8dcb8cd72d README: fix typo and wording on websocket test 2018-11-15 18:09:51 -03:00
Luna Mendes 5f9e04b866 README: add "Checking if it is working" section
Related to #18.
2018-11-15 18:08:12 -03:00
Luna Mendes 02d37091a7 pyflakes pass 2018-11-15 00:43:46 -03:00
Luna Mendes 7333651a7d .gitlab-ci.yml: try to fix pillow by adding -dev packages 2018-11-15 00:31:02 -03:00
Luna Mendes eed4912440 litecord.storage: give pinned value 2018-11-15 00:07:48 -03:00
Luna Mendes 31042e4129 litecord.storage: only query secure fields when actually secure=True 2018-11-14 23:44:35 -03:00
Luna Mendes 40ea0ac603 user.billing_job: fix logcall 2018-11-14 23:27:57 -03:00
Luna Mendes 61d553efb8 gateway.websocket: account for sharding in _guild_ids
Closes #1
2018-11-14 23:24:38 -03:00
Luna Mendes a50cf8a17c user.billing: use db instead of app instance in create_payment 2018-11-14 22:56:41 -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 976f8d0ed8 user.billing: fix get_ functions
- user.billing: add implementation for create_subscription
2018-11-14 16:36:25 -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 49aa6cd495 blueprints.users: add user avatars
- images: add IconManager.update
 - images: delete all other converted extension variants when deleting
2018-11-13 21:52:50 -03:00
Luna Mendes aaeca125ef gitignore: add images dir 2018-11-13 21:15:30 -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 e694348274 channel.messages: use args in query_tuple_from_args 2018-11-13 15:35:56 -03:00
Luna Mendes e7929b2099 schema.sql: fix table ordering 2018-11-13 04:34:26 -03:00
Luna Mendes cd08c657b1 .gitlab-ci.yml: use postgres hostname on psql 2018-11-13 04:28:50 -03:00
Luna Mendes 5aa1713133 .gitlab-ci.yml: add db initalization 2018-11-13 04:23:00 -03:00
Luna Mendes 797810df2c .gitlab-ci.yml: add git 2018-11-13 04:18:07 -03:00
Luna Mendes b58a0c5c84 .gitlab-ci.yml: add libffi-dev, openssl-dev 2018-11-13 04:14:15 -03:00
Luna Mendes c4b90d674a .gitlab-ci.yml: remove python3.7-dev 2018-11-13 04:09:44 -03:00
Luna Mendes cdad58bbc3 .gitlab-ci.yml: dunno maybe that works 2018-11-13 04:07:15 -03:00
Luna Mendes 893e96f8ec .gitlab-ci.yml: add cache related configs
taken from gitlab's default python ci config
2018-11-13 04:01:21 -03:00
Luna Mendes b9ccbbf53b Pipfile.lock: update it due to asyncpg update 2018-11-13 03:58:26 -03:00
Luna Mendes e7c51381e3 first try at a gitlab ci config
- Pipfile: update asyncpg from 0.16.0 to 0.18.2
2018-11-13 03:52:45 -03:00
Luna Mendes fb6a31a377 tests: add test_no_tracking.py 2018-11-13 02:53:53 -03:00