summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-24 00:01:15 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-24 00:01:15 +0000
commit39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf (patch)
treedf379bcb6de6f0ceb96ca34936fa9cdbd83e6de0 /src/room.py
parent17368d3d417b294feb44a843acf1e1d92afecb31 (diff)
downloadpoezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.tar.gz
poezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.tar.bz2
poezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.tar.xz
poezio-39b0075679ebf0a6c9dc2333c8f9bd08bfabbdcf.zip
Fixes blink on key_up key_down. Also do not set a room as 'urgent' when receiving an history message
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/room.py b/src/room.py
index f9dcabfc..f329ea1c 100644
--- a/src/room.py
+++ b/src/room.py
@@ -68,16 +68,15 @@ class Room(object):
user = self.get_user_by_name(nickname) if nickname is not None else None
if user:
user.set_last_talked(datetime.now())
- time = time if time is not None else datetime.now()
color = None
- if nickname is not None:
+ if not time and nickname is not None:
if not self.jid:
self.set_color_state(12)
else:
self.set_color_state(15)
else:
color = 8
- if nickname != self.own_nick and self.joined and nickname is not None: # do the highlight
+ if not time and nickname != self.own_nick and self.joined and nickname is not None: # do the highlight
try:
if self.own_nick.encode('utf-8') in txt:
self.set_color_state(13)
@@ -96,6 +95,7 @@ class Room(object):
self.set_color_state(13)
color = 2
break
+ time = time if time is not None else datetime.now()
self.messages.append(Message(txt, time, nickname, user, color))
def get_user_by_name(self, nick):