Exemplo n.º 1
0
        public void SendMessage(string jid, string body, XElement extraParams = null, string dialogId = null, string subject = null, MessageType messageType = MessageType.Chat)
        {
            var messageId = MongoObjectIdGenerator.GetNewObjectIdString();
            var message   = xmppClient.SendMessage(jid, messageId, body, subject, dialogId, extraParams, messageType);

            LoggerHolder.Log(LogLevel.Debug, "XMPP: SentMessage ====> " + message.DataString);
        }
Exemplo n.º 2
0
        public void SendMessage(int userId, string body, XElement extraParams = null, string dialogId = null, string subject = null, MessageType messageType = MessageType.Chat)
        {
            var messageId          = MongoObjectIdGenerator.GetNewObjectIdString();
            var wrappedMessageType = (Xmpp.Im.MessageType)Enum.Parse(typeof(Xmpp.Im.MessageType), messageType.ToString());
            var jidString          = BuildJid(userId, quickbloxClient.ApplicationId, quickbloxClient.ChatEndpoint);
            var jid     = new Xmpp.Jid(jidString);
            var message = xmppClient.SendMessage(jid, messageId, body, subject, dialogId, extraParams, wrappedMessageType);

            LoggerHolder.Log(LogLevel.Debug, "XMPP: SentMessage ====> " + message.DataString);
        }