fix typos

This commit is contained in:
Luna 2021-07-14 23:44:04 -03:00
parent d1b10e7409
commit 0eb37554d3
2 changed files with 3 additions and 5 deletions

View File

@ -506,7 +506,7 @@ class GatewayWebsocket:
channel_ids: List[int] = []
for guild_id in guild_ids:
_, channels = await app.dispatcher.guild.sub_user(guild_id, session_id)
_, channels = await app.dispatcher.guild.sub_user(guild_id, user_id)
channel_ids.extend(channels)
log.info("subscribing to {} guild channels", len(channel_ids))

View File

@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from typing import List
from typing import List, Tuple
from quart import current_app as app
from logbook import Logger
@ -64,9 +64,7 @@ class GuildDispatcher(DispatcherWithState[int, str, GatewayEvent, List[str]]):
guild_chan_ids = await app.storage.get_channel_ids(guild_id)
channel_ids = []
for channel_id in guild_chan_ids:
perms = await get_permissions(
self.state.user_id, channel_id, storage=self.storage
)
perms = await get_permissions(user_id, channel_id)
if perms.bits.read_messages:
channel_ids.append(channel_id)