soc.2009.transport: 8ed21780: Connect user automatically when he sent ...

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Wed Jul 1 10:00:44 EDT 2009


-----------------------------------------------------------------
Revision: 8ed217805822c1aa260921bf614b7931397971a6
Ancestor: 4b610662695a93806d716badf9894dd142db44bc
Author: hanzz at soc.pidgin.im
Date: 2009-07-01T13:58:33
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/8ed217805822c1aa260921bf614b7931397971a6

Modified files:
        main.cpp

ChangeLog: 

Connect user automatically when he sent message. This will help if transport crashes and users don't know about it and try to send message.

-------------- next part --------------
============================================================
--- main.cpp	e6a2e3464003b85f259a0e7ec3b06eb71b1c8666
+++ main.cpp	7d114c11baa840e625569f6d4a86b8e9425d51ee
@@ -1381,8 +1381,15 @@ void GlooxMessageHandler::handleMessage 
 			Log().Get(msg.from().bare()) << "New message received, but we're not connected yet";
 		}
 	}
-	else{
-		Log().Get(msg.from().bare()) << "New message received, but we're not connected to legacy network";
+	else {
+		Message s(Message::Chat, msg.from().full(), "This message couldn't be sent, because you are not connected to legacy network. You will be automatically reconnected soon.");
+		s.setFrom(jid());
+		j->send(s);
+		Tag *stanza = new Tag("presence");
+		stanza->addAttribute( "to", msg.from().bare());
+		stanza->addAttribute( "type", "probe");
+		stanza->addAttribute( "from", jid());
+		j->send(stanza);
 	}
 
 }


More information about the Commits mailing list