Code Duplication    Length = 12-15 lines in 2 locations

chat/tornado/message_handler.py 2 locations

@@ 361-375 (lines=15) @@
358
			message.giphy = None
359
			prep_imgs = process_images(data.get(VarNames.IMG), message)
360
			selector.update(content=message.content, symbol=message.symbol, giphy=None)
361
		self.publish(self.create_send_message(message, action, prep_imgs), message.room_id)
362
363
	def send_client_new_channel(self, message):
364
		room_id = message[VarNames.ROOM_ID]
365
		self.add_channel(room_id)
366
		self.add_online_user(room_id)
367
368
	def send_client_delete_channel(self, message):
369
		room_id = message[VarNames.ROOM_ID]
370
		self.async_redis.unsubscribe((room_id,))
371
		self.async_redis_publisher.hdel(room_id, self.id)
372
		self.channels.remove(room_id)
373
374
	def process_get_messages(self, data):
375
		"""
376
		:type data: dict
377
		"""
378
		header_id = data.get(VarNames.GET_MESSAGES_HEADER_ID, None)
@@ 459-470 (lines=12) @@
456
		else:
457
			raise ValidationError("Invalid channel status.")
458
459
	def reply_call_connection(self, in_message):
460
		self.send_call_answer(
461
			in_message,
462
			WebRtcRedisStates.RESPONDED,
463
			Actions.REPLY_CALL_CONNECTION,
464
			[WebRtcRedisStates.OFFERED],
465
			HandlerNames.WEBRTC_TRANSFER
466
		)
467
468
	def proxy_webrtc(self, in_message):
469
		"""
470
		:type in_message: dict
471
		"""
472
		connection_id = in_message[VarNames.CONNECTION_ID]
473
		channel = in_message.get(VarNames.WEBRTC_OPPONENT_ID)