Commit Graph

13 Commits

Author SHA1 Message Date
Luna Mendes 46759a4e7c pylint pass
fixing unused imports across all code
2018-11-13 01:40:31 -03:00
Luna Mendes 58c818bb68 guild.members: call pres_dispatch on role updates
- presence: fix 'everyone' list detection
2018-11-09 16:38:19 -03:00
Luna Mendes bd9c4cb26c pubsub.lazy_guild: add implementation for pres_update
- utils: fix index_by_func
2018-11-07 18:52:50 -03:00
Luna Mendes 856839d9e7 presence: don't send PRESENCE_UPDATEs about the same user 2018-10-26 03:50:29 -03:00
Luna Mendes 2605836790 dispatcher: add dispatch_filter
- presence: (basic) handle member lists when presence update.
    Note that the respective GUILD_UPDATE_MEMBER_LIST doesn't happen
    yet. we'll need roles beforehand.
2018-10-24 19:09:05 -03:00
Luna Mendes d28c0f1bc6 litecord.pubsub: add FriendDispatcher
- gateway.websocket: subscribe to friends on startup
 - presence: dispatch to friends on dispatch_pres
 - storage: add Storage.get_friend_ids
2018-10-12 16:17:29 -03:00
Luna Mendes 46fac95979 gateway.websocket: add presences field to ready payload
- presences: add PresenceManager.friend_presences
 - blueprints.auth: fix resend route
 - pubsub: add DispatcherWithState to decrease amount of
    repeated code between GuildDispatcher and ChannelDispatcher
 - storage: fix relationship id field
2018-10-12 02:10:31 -03:00
Luna Mendes 5afc15c4f6 storage: fix bug on last_message_id
- storage: better member.roles
 - presence: cast guild_id to str
2018-10-04 04:13:46 -03:00
Luna Mendes 34eda81e4f remove some print debug 2018-09-26 18:10:43 -03:00
Luna Mendes d242ef230a gateway.websocket: various fixes to presence
- handle BadRequest instead of passing raise_err=False
 - handle status.activities
 - ready: call update_status BEFORE subscribing and dispatching_ready

presence:
 - better presence object on guild_presences

schema:
 - handle activities, change required to false in game
2018-09-26 18:08:12 -03:00
Luna Mendes dd4ae44080 gateway.websocket: rudimentary lazy guilds
implementation details are on the docstrings for _handle_14.

 - presence: merge member dict instead of copying some fields from it
2018-09-10 22:32:58 -03:00
Luna Mendes cd5dbc4886 Rough presence management
Lots of changes to get it working.

One day changes will be able to be small enough to be split across
commits.

 - enums: use enum.Enum, make EasyEnum subclass
 - enums: add ActivityType, ActivityFlags, StatusType
 - gateway.state: use 128 random bits instead of 256
 - gateway.state: add MAX_STORE_SIZE in PayloadStore and check it when
    adding a new payload
 - gateway.websocket: add GatewayWebsocket.update_status
 - presence: add PresenceManager.dispatch_guild_pres and
    PresenceManager.dispatch_pres
 - schema: add snowflake, activity_type, status_external types
 - schema: add GW_ACTIVITY, GW_STATUS_UPDATE
 - storage: fix _channels_extra and fixes for ChannelType as enum instead of
    class
2018-09-10 01:09:09 -03:00
Luna Mendes d39783e666 Add barebones implementation for GUILD_SYNC
- state_manager: add StateManager.guild_states
 - add PresenceManager in the presence module
 - fix get_user_guilds not returning ints
 - gateway: add dummy handler for op 4
 - gateway: add hazmat implementation for op 14
 - run: keep websockets logger on INFO
 - run: add more headers on app_after_request
2018-09-01 23:53:36 -03:00