def _on_return(self, text):
        """Called when the user presses return on the send message widget."""
        # Ignore if the user hasn't typed a message.
        if not text:
            return
        elif text.startswith('/image') and len(text.split(' ')) == 2:
            # Temporary UI for testing image uploads
            filename = text.split(' ')[1]
            try:
                image_file = open(filename, 'rb')
            except FileNotFoundError:
                message = 'Failed to find image {}'.format(filename)
                self._status_widget.show_message(message)
                return
            text = ''
        else:
            image_file = None
        if not self._keep_emoticons:
            text = replace_emoticons(text)
        segments = hangups.ChatMessageSegment.from_str(text)
        self._coroutine_queue.put(
            self._handle_send_message(
                self._conversation.send_message(
                    segments, image_file=image_file
                )
            )
        )
Called when the user presses return on the send message widget.
hangups/ui/__main__.py