Merge pull request #404 from nephila/hotfix/channels_connect

fix error in ws_connect
This commit is contained in:
Iacopo Spalletti 2018-01-05 16:06:37 +01:00 committed by GitHub
commit 8014c9163e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -27,6 +27,7 @@ def liveblog_connect(message, apphook, lang, post):
})
return
Group(post.liveblog_group).add(message.reply_channel)
message.reply_channel.send({"accept": True})
def liveblog_disconnect(message, apphook, lang, post):

View file

@ -38,6 +38,8 @@ try:
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
message = self.get_next_message('setup', require=True)
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
result = self.get_next_message(message.reply_channel.name, require=True)
self.assertTrue(result['accept'])
plugin = add_plugin(
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True
@ -80,6 +82,8 @@ try:
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
message = self.get_next_message('setup', require=True)
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
result = self.get_next_message(message.reply_channel.name, require=True)
self.assertTrue(result['accept'])
plugin = add_plugin(
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=False
@ -114,6 +118,8 @@ try:
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
message = self.get_next_message('setup', require=True)
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
result = self.get_next_message(message.reply_channel.name, require=True)
self.assertTrue(result['accept'])
plugin = add_plugin(
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True