mirror of https://gitlab.com/litecord/litecord.git
gateway.websocket: anoter Storage -> UserStorage
This commit is contained in:
parent
0449fad9a3
commit
66ea960f71
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue