mirror of https://gitlab.com/litecord/litecord.git
gateway.websocket: anoter Storage -> UserStorage
This commit is contained in:
parent
0449fad9a3
commit
66ea960f71
|
|
@ -190,8 +190,6 @@ async def create_message(channel_id):
|
||||||
await app.dispatcher.dispatch('channel', channel_id,
|
await app.dispatcher.dispatch('channel', channel_id,
|
||||||
'MESSAGE_CREATE', payload)
|
'MESSAGE_CREATE', payload)
|
||||||
|
|
||||||
# TODO: dispatch the MESSAGE_CREATE to any mentioning user.
|
|
||||||
|
|
||||||
if ctype == ChannelType.GUILD_TEXT:
|
if ctype == ChannelType.GUILD_TEXT:
|
||||||
for str_uid in payload['mentions']:
|
for str_uid in payload['mentions']:
|
||||||
uid = int(str_uid)
|
uid = int(str_uid)
|
||||||
|
|
|
||||||
|
|
@ -765,7 +765,7 @@ class GatewayWebsocket:
|
||||||
"""
|
"""
|
||||||
data = payload['d']
|
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'])
|
guild_id = int(data['guild_id'])
|
||||||
|
|
||||||
# make sure to not extract info you shouldn't get
|
# make sure to not extract info you shouldn't get
|
||||||
|
|
|
||||||
|
|
@ -662,7 +662,6 @@ class Storage:
|
||||||
return str(role_id)
|
return str(role_id)
|
||||||
|
|
||||||
if role_id == guild_id:
|
if role_id == guild_id:
|
||||||
# TODO: check MENTION_EVERYONE permission
|
|
||||||
return str(role_id)
|
return str(role_id)
|
||||||
|
|
||||||
role = await self.get_role(role_id, guild_id)
|
role = await self.get_role(role_id, guild_id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue