Smuxi.Engine.XmppProtocolManager._Say C# (CSharp) Method

_Say() private method

private _Say ( Smuxi.Engine.ChatModel chat, string text, bool send, bool display ) : void
chat Smuxi.Engine.ChatModel
text string
send bool
display bool
return void
        void _Say(ChatModel chat, string text, bool send, bool display)
        {
            if (!chat.IsEnabled) {
                return;
            }
            if (chat == ContactChat) {
                return;
            }

            if (send) {
                if (chat.ChatType == ChatType.Person) {
                    var _person = (chat as PersonChatModel).Person as PersonModel;
                    XmppPersonModel person = GetOrCreateContact(_person.ID, _person.IdentityName);
                    SendPrivateMessage(person, _person.ID, text);
                } else if (chat.ChatType == ChatType.Group) {
                    JabberClient.Send(new Message(chat.ID, XmppMessageType.groupchat, text));
                    return; // don't show now. the message will be echoed back if it's sent successfully
                }
            }

            var builder = CreateMessageBuilder();
            builder.AppendSenderPrefix(Me);
            builder.AppendMessage(text);
            var msg = builder.ToMessage();
            if (display) {
                Session.AddMessageToChat(chat, msg);
            }
            OnMessageSent(
                new MessageEventArgs(chat, msg, null, chat.ID)
            );
        }

Same methods

XmppProtocolManager::_Say ( Smuxi.Engine.ChatModel chat, string text ) : void
XmppProtocolManager::_Say ( Smuxi.Engine.ChatModel chat, string text, bool send ) : void