##// 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 246 registry = get_current_registry()
247 247 rhodecode_plugins = getattr(registry, 'rhodecode_plugins', {})
248 channelstream_config = rhodecode_plugins.get('channelstream')
248 channelstream_config = rhodecode_plugins.get('channelstream', {})
249 249 msg_url = ''
250 250 if commit_obj:
251 251 msg_url = commit_comment_url
@@ -254,7 +254,7 b' class ChangesetCommentsModel(BaseModel):'
254 254 msg_url = pr_comment_url
255 255 repo_name = pr_target_repo.repo_name
256 256
257 if channelstream_config:
257 if channelstream_config.get('enabled'):
258 258 message = '<strong>{}</strong> {} - ' \
259 259 '<a onclick="window.location=\'{}\';' \
260 260 'window.location.reload()">' \
@@ -262,7 +262,6 b' class ChangesetCommentsModel(BaseModel):'
262 262 message = message.format(
263 263 user.username, _('made a comment'), msg_url,
264 264 _('Refresh page'))
265 if channelstream_config:
266 265 channel = '/repo${}$/pr/{}'.format(
267 266 repo_name,
268 267 pull_request_id
General Comments 0
You need to be logged in to leave comments. Login now