<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -863,22 +863,23 @@ void ChatService::decodeBuddyListResponse( QIODevice *responseInput )
             bool idle = nowAvailableList.value(userId).toMap()[&quot;i&quot;].toBool();
             if ( _buddyInfos.contains(userId) )
             {
+                
                 // if the user id is already there with the same idle status, don't emit
                 // anything
-		    qDebug() &lt;&lt; &quot;checking status for &quot; &lt;&lt; userId;
+                qDebug() &lt;&lt; &quot;checking status for&quot; &lt;&lt; userId &lt;&lt; &quot;(&quot; &lt;&lt; _buddyInfos.value(userId).name() &lt;&lt; &quot;)&quot;;
                 if ( _availableBuddies.contains(userId) &amp;&amp; 
                      ( _availableBuddies.value(userId) == idle ) )
                     continue;
 
 		bool firstTime = !_availableBuddies.contains(userId);
 
-		qDebug() &lt;&lt; userId &lt;&lt; &quot; status changed to &quot; &lt;&lt; idle;
+		qDebug() &lt;&lt; userId &lt;&lt; &quot;(&quot; &lt;&lt; _buddyInfos.value(userId).name() &lt;&lt; &quot;)&quot;&lt;&lt; &quot;is&quot; &lt;&lt; ( idle ? &quot;&quot; : &quot;not &quot; ) &lt;&lt; &quot;idle&quot;;
                 _availableBuddies[userId] = idle;
 		/* On first appearing, a buddy should be assumed to be
 		   online.  (otherwise he's not added to the list;
 		   code wasn't well thought-out) */
-		if (firstTime)
-			emit buddyAvailable(_buddyInfos.value(userId), true);
+		if (firstTime &amp;&amp; idle)
+                    emit buddyAvailable(_buddyInfos.value(userId), false);
                 emit buddyAvailable(_buddyInfos.value(userId), idle);
             }           
             else</diff>
      <filename>facebook/chatservice.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -280,11 +280,11 @@ void  FacebookAccount::slotBuddyAvailable( const Facebook::BuddyInfo &amp;buddy, boo
     // server -&gt; local
     if ( !contact( buddy.buddyId() ) )
     {
-	kDebug(FBDBG) &lt;&lt; &quot;Contact &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot; is not in the contact list. Ugh!&quot;;
+	kDebug(FBDBG) &lt;&lt; &quot;Buddy &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot;(&quot; &lt;&lt; buddy.name() &lt;&lt; &quot;)&quot;&lt;&lt; &quot; is not in the contact list. Ugh!&quot;;
         return;
     }
     
-    qDebug() &lt;&lt; &quot;Contact &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot; available&quot;;
+    qDebug() &lt;&lt; &quot;Buddy &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot;(&quot; &lt;&lt; buddy.name() &lt;&lt; &quot;)&quot; &lt;&lt; &quot; available, &quot; &lt;&lt; ( idle ? &quot;&quot; : &quot;not&quot; ) &lt;&lt; &quot;idle&quot;;
     contact( buddy.buddyId() )-&gt;setOnlineStatus( idle ? FacebookProtocol::protocol()-&gt;facebookAway : FacebookProtocol::protocol()-&gt;facebookOnline );
 }
 
@@ -293,7 +293,7 @@ void  FacebookAccount::slotBuddyNotAvailable( const Facebook::BuddyInfo &amp;buddy )
     // server -&gt; local
     if ( !contact( buddy.buddyId() ) )
     {
-	kDebug(FBDBG) &lt;&lt; &quot;Contact &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot; is not in the contact list. Ugh!&quot;;
+	kDebug(FBDBG) &lt;&lt; &quot;Buddy &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot; is not in the contact list. Ugh!&quot;;
         return;
     }
     contact( buddy.buddyId() )-&gt;setOnlineStatus( FacebookProtocol::protocol()-&gt;facebookOffline );
@@ -304,7 +304,7 @@ void  FacebookAccount::slotBuddyInformation( const Facebook::BuddyInfo &amp;buddy )
     // server -&gt; local
     if ( !contact( buddy.buddyId() ) )
     {
-	kDebug(FBDBG) &lt;&lt; &quot;Contact &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot; is not in the contact list. Adding...&quot;;
+	kDebug(FBDBG) &lt;&lt; &quot;Buddy &quot; &lt;&lt; buddy.buddyId() &lt;&lt; &quot;(&quot; &lt;&lt; buddy.name() &lt;&lt; &quot;)&quot; &lt;&lt; &quot;is not in the contact list. Adding...&quot;;
 	Kopete::Group *g = Kopete::ContactList::self()-&gt;findGroup(&quot;Facebook&quot;);
 	addContact(buddy.buddyId(), buddy.name().isEmpty() ? buddy.buddyId() : buddy.name() , g, Kopete::Account::ChangeKABC);
         contact( buddy.buddyId() )-&gt;setOnlineStatus( FacebookProtocol::protocol()-&gt;facebookOffline );</diff>
      <filename>facebookaccount.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4822b90b7613f6e5ba8acceae25ec300b79143f</id>
    </parent>
  </parents>
  <author>
    <name>Duncan Mac-Vicar P</name>
    <email>duncan@kde.org</email>
  </author>
  <url>http://github.com/dmacvicar/kopete-facebook/commit/8aa3ae1328e178b42bae9d61eb6b10e37bd6c2e8</url>
  <id>8aa3ae1328e178b42bae9d61eb6b10e37bd6c2e8</id>
  <committed-date>2009-08-04T14:13:09-07:00</committed-date>
  <authored-date>2009-08-04T14:13:09-07:00</authored-date>
  <message>improve debug messages.

first appareance parameter is wrong. true means idle. shot myself in the foot
by using boolean parameters even if I hate them.</message>
  <tree>fccfa0c9917b10d25a351c9fdea8933ca3fbf8b2</tree>
  <committer>
    <name>Duncan Mac-Vicar P</name>
    <email>duncan@kde.org</email>
  </committer>
</commit>
