pubsub.guild: only pass flags when required

This commit is contained in:
Luna 2019-07-20 13:21:32 -03:00
parent fb18662af4
commit ad751cdad7
1 changed files with 7 additions and 1 deletions

View File

@ -54,8 +54,14 @@ class GuildDispatcher(DispatcherWithFlags):
log.debug('sending raw action {!r} to chan={}',
action, chan_id)
# for now, only sub() has support for flags.
# it is an idea to have flags support for other actions
args = []
if action == 'sub':
args.append(flags)
await self.main_dispatcher.action(
'channel', action, chan_id, user_id, flags
'channel', action, chan_id, user_id, *args
)
async def _chan_call(self, meth: str, guild_id: int, *args):