From 4fe40baab9ad55af9c67b5b384f9534356c74221 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 1 Mar 2006 20:20:00 +0000
Subject: [PATCH] don't take last_status_time into account when it's a
 groupchat contact. Fixes #1628

---
 src/gajim.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index a2c0ceb841..6e394e730e 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -776,10 +776,11 @@ class Interface:
 			# is offline, so only on Contact instance
 			if isinstance(c, list):
 				c = c[0]
-			c.last_status_time = time.localtime(time.time() - array[2])
-			if array[3]:
-				c.status = array[3]
-			win.set_last_status_time()
+			if c: # c can be none if it's a gc contact
+				c.last_status_time = time.localtime(time.time() - array[2])
+				if array[3]:
+					c.status = array[3]
+				win.set_last_status_time()
 		if self.remote_ctrl:
 			self.remote_ctrl.raise_signal('LastStatusTime', (account, array))
 
-- 
GitLab