Code

empty messages are passed onto all listeners in pedro, gui ignores such messages
authordaleharvey <daleharvey@users.sourceforge.net>
Thu, 3 Aug 2006 21:56:19 +0000 (21:56 +0000)
committerdaleharvey <daleharvey@users.sourceforge.net>
Thu, 3 Aug 2006 21:56:19 +0000 (21:56 +0000)
src/jabber_whiteboard/inkboard-document.cpp
src/jabber_whiteboard/inkboard-document.h
src/jabber_whiteboard/pedrogui.cpp
src/jabber_whiteboard/session-manager.cpp
src/pedro/pedroxmpp.cpp

index c46546ebc47822ac4d5f32f310c6c9c8e8a36ef2..e8baee4c70b8c2a073d64b0894c571ca3aee888a 100644 (file)
@@ -83,7 +83,7 @@ InkboardDocument::processInkboardEvent(Message::Wrapper &wrapper, Pedro::Element
         {
             if(data->exists(Message::ACCEPT_INVITATION)); 
             {
-                // TODO : Would be nice to create the desktop here
+                // TODO : Would be nice to create the desktp
 
                 sendProtocol(getRecipient(),Message::PROTOCOL, Message::CONNECTED);
                 sendProtocol(getRecipient(),Message::PROTOCOL, Message::DOCUMENT_BEGIN);
@@ -109,7 +109,6 @@ InkboardDocument::sendProtocol(const Glib::ustring &destJid, Message::Wrapper &w
                         "<%s />"
                     "</%s>"
                 "</wb>"
-                "<body> </body>"
             "</message>";
 
         if (!_sm->getClient().write(fmt,
index 4f0f05e0786c3e6d0a30ff20db3d64df4c700981..fcd3bab6aaeda3994b1298634996f671fdc0a559 100644 (file)
@@ -75,8 +75,9 @@ private:
 
     void _initBindings();
 
-    SessionManager *_sm;
-    State::SessionType _type;
+    SessionManager      *_sm;
+    SPDocument          *_doc;
+    State::SessionType  _type;
     State::SessionState state;
 
     Glib::ustring _session;
index 64578f9af0a1919d860cc6219158e2302ae338ee..3e8ee72a19e95b2951c2ef1b65c7c583000a543d 100644 (file)
@@ -2114,19 +2114,22 @@ bool PedroGui::chatDeleteAll()
 
 bool PedroGui::chatMessage(const DOMString &from, const DOMString &data)
 {
-    std::vector<ChatWindow *>::iterator iter;
-    for (iter=chats.begin() ; iter != chats.end() ; iter++)
-        {
-        if (from == (*iter)->getJid())
+    if(data.size() < 1)
+    {
+        std::vector<ChatWindow *>::iterator iter;
+        for (iter=chats.begin() ; iter != chats.end() ; iter++)
             {
-            (*iter)->postMessage(data);
-            return true;
+            if (from == (*iter)->getJid())
+                {
+                (*iter)->postMessage(data);
+                return true;
+                }
             }
-        }
-    ChatWindow *chat = new ChatWindow(*this, from);
-    chat->show();
-    chats.push_back(chat);
-    chat->postMessage(data);
+        ChatWindow *chat = new ChatWindow(*this, from);
+        chat->show();
+        chats.push_back(chat);
+        chat->postMessage(data);
+    }
     return true;
 }
 
index ef842e339e39363164ab71b430db139fa19f8db1..55b41ac204cbb3828ef047a87567dc148ad665c9 100644 (file)
@@ -312,8 +312,8 @@ SessionManager::checkInvitationQueue()
 
         Dialog::DialogReply reply = static_cast< Dialog::DialogReply >(dialog.run());
 
-        SPDocument* doc = makeInkboardDocument(
-            g_quark_from_static_string("xml"), "svg:svg", State::WHITEBOARD_PEER, from);
+
+        SPDocument* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", State::WHITEBOARD_PEER, from);
 
         InkboardDocument* inkdoc = dynamic_cast< InkboardDocument* >(doc->rdoc);
         if(inkdoc == NULL) return true;
index 48a4930b4837e29342dc8c8bace51b67fe67e4b0..ccaaea4bd768fe5bfcd45759854a28169dc973d0 100644 (file)
@@ -1035,8 +1035,8 @@ bool XmppClient::processMessage(Element *root)
     DOMString body    = root->getTagValue("body");
     DOMString thread  = root->getTagValue("thread");
     //##rfc 3921, para 2.4.  ignore if no recognizable info
-    if (subject.size() < 1 && body.size()<1 && thread.size()<1)
-        return true;
+    //if (subject.size() < 1 && thread.size()<1)
+    //    return true;
 
     if (type == "groupchat")
         {