##// END OF EJS Templates
channelstream: don't try to communicate with ws server if not explictly enabled
ergo -
r546:c224f1f2 default
parent child Browse files
Show More
@@ -245,7 +245,7 b' class ChangesetCommentsModel(BaseModel):'
245
245
246 registry = get_current_registry()
246 registry = get_current_registry()
247 rhodecode_plugins = getattr(registry, 'rhodecode_plugins', {})
247 rhodecode_plugins = getattr(registry, 'rhodecode_plugins', {})
248 channelstream_config = rhodecode_plugins.get('channelstream')
248 channelstream_config = rhodecode_plugins.get('channelstream', {})
249 msg_url = ''
249 msg_url = ''
250 if commit_obj:
250 if commit_obj:
251 msg_url = commit_comment_url
251 msg_url = commit_comment_url
@@ -254,7 +254,7 b' class ChangesetCommentsModel(BaseModel):'
254 msg_url = pr_comment_url
254 msg_url = pr_comment_url
255 repo_name = pr_target_repo.repo_name
255 repo_name = pr_target_repo.repo_name
256
256
257 if channelstream_config:
257 if channelstream_config.get('enabled'):
258 message = '<strong>{}</strong> {} - ' \
258 message = '<strong>{}</strong> {} - ' \
259 '<a onclick="window.location=\'{}\';' \
259 '<a onclick="window.location=\'{}\';' \
260 'window.location.reload()">' \
260 'window.location.reload()">' \
@@ -262,7 +262,6 b' class ChangesetCommentsModel(BaseModel):'
262 message = message.format(
262 message = message.format(
263 user.username, _('made a comment'), msg_url,
263 user.username, _('made a comment'), msg_url,
264 _('Refresh page'))
264 _('Refresh page'))
265 if channelstream_config:
266 channel = '/repo${}$/pr/{}'.format(
265 channel = '/repo${}$/pr/{}'.format(
267 repo_name,
266 repo_name,
268 pull_request_id
267 pull_request_id
General Comments 0
You need to be logged in to leave comments. Login now