gateway.websocket: anoter Storage -> UserStorage

This commit is contained in:
Luna Mendes 2018-11-18 01:05:53 -03:00
parent 0449fad9a3
commit 66ea960f71
3 changed files with 2 additions and 5 deletions

View File

@ -181,7 +181,7 @@ async def create_message(channel_id):
)
payload = await app.storage.get_message(message_id, user_id)
if ctype == ChannelType.DM:
# guild id here is the peer's ID.
await _dm_pre_dispatch(channel_id, user_id)
@ -190,8 +190,6 @@ async def create_message(channel_id):
await app.dispatcher.dispatch('channel', channel_id,
'MESSAGE_CREATE', payload)
# TODO: dispatch the MESSAGE_CREATE to any mentioning user.
if ctype == ChannelType.GUILD_TEXT:
for str_uid in payload['mentions']:
uid = int(str_uid)

View File

@ -765,7 +765,7 @@ class GatewayWebsocket:
"""
data = payload['d']
gids = await self.storage.get_user_guilds(self.state.user_id)
gids = await self.user_storage.get_user_guilds(self.state.user_id)
guild_id = int(data['guild_id'])
# make sure to not extract info you shouldn't get

View File

@ -662,7 +662,6 @@ class Storage:
return str(role_id)
if role_id == guild_id:
# TODO: check MENTION_EVERYONE permission
return str(role_id)
role = await self.get_role(role_id, guild_id)