Send message to the chanel.

@param conversationId ID of a conversation to send a message to.
@param message        Message to be send.
@return Observable to send message to a conversation.
558689
public Observable<ComapiResult<MessageSentResponse>> sendMessage(@NonNull final String conversationId, @NonNull final MessageToSend message) {

        final String token = getToken();

        if (sessionController.isCreatingSession()) {
            return getTaskQueue().queueSendMessage(conversationId, message);
        } else if (TextUtils.isEmpty(token)) {
            return Observable.error(getSessionStateErrorDescription());
        } else {
            return doSendMessage(token, conversationId, message);
        }
    }
48934
public Observable<Boolean> deleteConversation(String conversationId) {

        return asObservable(new Executor<Boolean>() {
            @Override
            void execute(ChatStore store, Emitter<Boolean> emitter) {
                store.beginTransaction();
                boolean isSuccess = store.deleteConversation(conversationId);
                store.endTransaction();
                emitter.onNext(isSuccess);
                emitter.onCompleted();
            }
        });
    }
484004
public Observable<ComapiResult<ConversationDetails>> createConversation(@NonNull final ConversationCreate request) {

        final String token = getToken();

        if (sessionController.isCreatingSession()) {
            return getTaskQueue().queueCreateConversation(request);
        } else if (TextUtils.isEmpty(token)) {
            return Observable.error(getSessionStateErrorDescription());
        } else {
            return doCreateConversation(token, request);
        }
    }
149978
function(conversationId, name, text, callback) {
      send(null, conversationId, utils.messageText('name', name, text), callback);
    }
1373194
Observable<ChatResult> sendMessageWithAttachments(@NonNull final String conversationId, @NonNull final MessageToSend message, @Nullable final List<Attachment> attachments) {

        final MessageProcessor messageProcessor = attCon.createMessageProcessor(message, attachments, conversationId, getProfileId());

        return checkState()
                .flatMap(client ->
                {
                    messageProcessor.preparePreUpload(); // convert fom too large message parts to attachments, adds temp upload parts for all attachments
                    return upsertTempMessage(messageProcessor.createTempMessage()) // create temporary message
                            .flatMap(isOk -> attCon.uploadAttachments(messageProcessor.getAttachments(), client)) // upload attachments
                            .flatMap(uploaded -> {
                                if (uploaded != null && !uploaded.isEmpty()) {
                                    messageProcessor.preparePostUpload(uploaded); // remove temp upload parts, add parts with upload data
                                    return upsertTempMessage(messageProcessor.createTempMessage()); // update message with attachments details like url
                                } else {
                                    return Observable.fromCallable(() -> true);
                                }
                            })
                            .flatMap(isOk -> client.service().messaging().sendMessage(conversationId, messageProcessor.prepareMessageToSend()) // send message with attachments details as additional message parts
                                    .flatMap(result -> result.isSuccessful() ? updateStoreWithSentMsg(messageProcessor, result) : handleMessageError(messageProcessor, new ComapiException(result.getErrorBody()))) // update temporary message with a new message id obtained from the response
                                    .onErrorResumeNext(t -> handleMessageError(messageProcessor, t))); // if error occurred update message status list adding error status
                });
    }
730127
public WebSocketContext sendToTagged(String message, String tag) {
        return sendToTagged(message, tag, false);
    }
15418
def send_message(self, text, chat_id, reply_to_message_id=None, disable_web_page_preview=False, reply_markup=None):
        
        self.logger.info('sending message "%s"', format(text.replace('\n', '\\n')))
        payload = dict(text=text,
                       chat_id=chat_id,
                       reply_to_message_id=reply_to_message_id,
                       disable_web_page_preview=disable_web_page_preview,
                       reply_markup=reply_markup)
        return Message.from_api(self, **self._get('sendMessage', payload))
66851
public static void sendMessage (DObject speakObj, ChatMessage msg)
    {
        if (speakObj == null) {
            log.warning("Dropping speak message, no speak obj '" + msg + "'.", new Exception());
            return;
        }

        // post the message to the relevant object
        speakObj.postMessage(ChatCodes.CHAT_NOTIFICATION, new Object[] { msg });

        // if this is a user message; add it to the heard history of all users that can "hear" it
        if (!(msg instanceof UserMessage)) {
            return;

        } else if (speakObj instanceof SpeakObject) {
            _messageMapper.omgr = (RootDObjectManager)speakObj.getManager();
            _messageMapper.message = (UserMessage)msg;
            ((SpeakObject)speakObj).applyToListeners(_messageMapper);
            _messageMapper.omgr = null;
            _messageMapper.message = null;

        } else {
            log.info("Unable to note listeners", "dclass", speakObj.getClass(), "msg", msg);
        }
    }
556168
public ChannelFuture send(Message message) throws NotConnectedException {
        if (!connected) {
            throw new NotConnectedException();
        }

        if (log.isDebugEnabled()) {
            log.debug(">>> {}", message.toString().trim());
        }

        return channel.write(message);
    }
299994
public void sendMessage(Message message) {
    OutgoingPacket opk = new OutgoingPacket(REQID.zeroREQID, message);
    socketChannelHelper.sendPacket(opk);
  }
409594
public void sendMessage(Message message) throws NotConnectedException, InterruptedException {
        // Force the recipient, message type, and thread ID since the user elected
        // to send the message through this chat object.
        message.setTo(participant);
        message.setType(Message.Type.chat);
        message.setThread(threadID);
        chatManager.sendMessage(this, message);
    }
828801
public void setMessage(CharSequence message){
        if(mConstruct != null && !mConstruct.getDesign().isMaterial()){
            TextView msgView = (TextView) getDialog().findViewById(R.id.message);
            msgView.setText(message);
        }else{
            if(mMessage != null){
                mMessage.setText(message);
            }
        }
    }
448749
public AVIMConversation getConversation(String conversationId) {
    if (StringUtil.isEmpty(conversationId)) {
      return null;
    }
    return this.getConversation(conversationId, false, conversationId.startsWith(Conversation.TEMPCONV_ID_PREFIX));
  }
1241288
protected void sendSpeak (BodyObject source, String message, byte mode)
    {
        SpeakUtil.sendSpeak(_speakObj, source.getVisibleName(), null, message, mode);
    }
60937
public Observable<ComapiResult<Void>> isTyping(@NonNull final String conversationId) {

        final String token = getToken();

        if (sessionController.isCreatingSession() || TextUtils.isEmpty(token)) {
            return Observable.error(getSessionStateErrorDescription());
        } else {
            return doIsTyping(token, conversationId, true);
        }
    }
1013267
@Override
    public void sendMsg(String msg)
    {
        DbConn cnx = Helpers.getNewDbSession();
        try
        {
            Message.create(cnx, msg, ji.getId());
            cnx.commit();
        }
        finally
        {
            Helpers.closeQuietly(cnx);
        }
    }
1203854
def reply_to(self, message, text, **kwargs):
        
        return self.send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)