Posts messages to node
@param {string} messageId - Message to be passed
331053
function postMessageToNode(messageId) {
        var msg = {
            fn: messageId,
            args: getFunctionArgs(arguments),
            requester: domainID
        };
        updateDomain.exec('data', msg);
    }
151544
function onMessage(userId, msg) {
    var dialogId = msg.dialog_id,
        isForCurrentDialog = isMessageForCurrentDialog(userId, dialogId);

    updateCallState({
        dialogId: dialogId,
        userId: userId,
        active: isForCurrentDialog,
        type: msg.extension.notification_type
    });

    if (!msg.body) return true;

    // check if it's a message for current dialog
    if (isMessageForCurrentDialog(userId, dialogId)) {
        dialogsMessages.push(msg);

        if (msg.markable === 1 && userId != currentUser.id) {
            sendReadStatus(userId, msg.id, dialogId);
        }

        // сheck if it's an attachment
        //
        var messageAttachmentFileId = null;

        if (msg.extension.hasOwnProperty("attachments")) {
            if (msg.extension.attachments.length > 0) {
                messageAttachmentFileId = msg.extension.attachments[0].id;
            }
        }

        showMessage(userId, msg, messageAttachmentFileId);
    }

    // Here we process the regular messages
    //
    updateDialogsList(dialogId, msg.body);

    if (userId != currentUser.id) {
        playSoundOnNewMessage();
    }
}
259842
function post(logStore, topic, source, keyContents) {
  return AliyunLog && AliyunLog.postAliyunLog && AliyunLog.postAliyunLog(logStore, topic, source, keyContents);
}
13927
function showMessage(userId, msg, attachmentFileId) {
    var userLogin = getUserLoginById(userId);
    var messageHtml = buildMessageHTML(msg.body, userLogin, new Date(), attachmentFileId, msg.id);

    $('#messages-list').append(messageHtml);

    // scroll to bottom
    var mydiv = $('#messages-list');
    mydiv.scrollTop(mydiv.prop('scrollHeight'));
}
117447
function (messageEvent) {
		var messageObject = JSON.parse(messageEvent.data || '{}');
		if ((messageObject || {})
			.action && messageObject.action === MESSENGER_CONST.ACTION.CONNECT) {
			appWindow = messageEvent.source;
			appOrigin = messageEvent.origin;
			connectionRequestID = messageObject.id;
			status.initialized = true;
			if (status.enabled) {
				connect();
			}
		}
	}
53768
private void sendMessageDelayed(Crouton crouton, final int messageId, final long delay) {
    Message message = obtainMessage(messageId);
    message.obj = crouton;
    sendMessageDelayed(message, delay);
  }
822208
async def post(self):
        
        post = (await self.region._get_messages(
            fromid=self._post_id, limit=1))[0]
        assert post.id == self._post_id
        return post
1355798
public void send(String destName, String messageText)
            throws MessagingException {
        this.send(destName, (Serializable) messageText);
    }
153395
function _postMessageByPass(msg) {
            ternPromise.done(function (ternModule) {
                if (config.debug) {
                    console.debug("Sending message", msg);
                }
                _ternNodeDomain.exec("invokeTernCommand", msg);
            });
        }
1352675
private void sendDelayedMessage(SuperToast superToast, int messageId, long delay) {
        Message message = obtainMessage(messageId);
        message.obj = superToast;
        sendMessageDelayed(message, delay);
    }
717792
function callSendAPI(messageData) {
    request({
        uri: 'https://graph.facebook.com/v2.6/me/messages',
        qs: {
            access_token: PAGE_ACCESS_TOKEN
        },
        method: 'POST',
        json: messageData

    }, function(error, response, body) {

        if (!error && response.statusCode == 200) {
            var recipientId = body.recipient_id;
            var messageId = body.message_id;

            if (messageId) {
                console.log("Successfully sent message with id %s to recipient %s",
                    messageId, recipientId);
            } else {
                console.log("Successfully called Send API for recipient %s",
                    recipientId);
            }
        } else {
            console.error("Failed calling Send API", response.statusCode, response.statusMessage, body.error);
        }
    });
}
23889
def reply(self, messageId, *messageParts):
        
        routingInfo = self._routingInfo.pop(messageId)
        self.send(routingInfo + [messageId, b''] + list(messageParts))
1106481
protected function sendMessageNode($to, $node, $id = null, $plaintextNode = null)
    {
        $msgId = ($id == null) ? $this->createMsgId() : $id;
        $to = $this->getJID($to);

        if ($node->getTag() == 'body' || $node->getTag() == 'enc') {
            $type = 'text';
        } else {
            $type = 'media';
        }

        $messageNode = new ProtocolNode('message', [
            'to'      => $to,
            'type'    => $type,
            'id'      => $msgId,
            't'       => time(),
            'notify'  => $this->name,
        ], [$node], '');

        $this->sendNode($messageNode);

        if ($node->getTag() == 'enc') {
            $node = $plaintextNode;
        }

        $this->logFile('info', '{type} message with id {id} sent to {to}', ['type' => $type, 'id' => $msgId, 'to' => ExtractNumber($to)]);
        $this->eventManager()->fire('onSendMessage',
            [
                $this->phoneNumber,
                $to,
                $msgId,
                $node,
            ]);

       // $this->waitForServer($msgId);

        return $msgId;
    }
546904
private void onMessageDelivered(MessageDeliveredEvent event) {
        handler.post(() -> listener.onMessageDelivered(event));
        log("Event published " + event.toString());
    }
1137640
public void removeMessageFromCache(long messageId) {
        WeakReference<Message> messageRef = messages.remove(messageId);
        if (messageRef != null) {
            messageIdByRef.remove(messageRef, messageId);
        }
    }
1310757
function logMessage (message) {
  if (!process.send) {
    console.log(message)
  } else {
    process.send(message)
  }
}
1211790
function (msg, nodeId, ns) {
            nodeId = nodeId || "errorFlash";
            this.flashMessage(msg, nodeId, ns, true);
        }