X-Git-Url: http://git.maemo.org/git/?p=theonering;a=blobdiff_plain;f=src%2Fautogv.py;h=346f48ce52a9ecdda3e7a9625ae991bf15d4a1fa;hp=fcc138661343011f889fb9a106ca30cde36f23cc;hb=548c58651ec7849619b9d823fdeee169be6c87b5;hpb=69291b6ea410825bc288f4071e4a2bd200bdac2e diff --git a/src/autogv.py b/src/autogv.py index fcc1386..346f48c 100644 --- a/src/autogv.py +++ b/src/autogv.py @@ -19,9 +19,10 @@ import util.coroutines as coroutines import util.go_utils as gobject_utils import util.tp_utils as telepathy_utils import util.misc as misc_utils +import gvoice -_moduleLogger = logging.getLogger("autogv") +_moduleLogger = logging.getLogger(__name__) class NewGVConversations(object): @@ -68,12 +69,11 @@ class NewGVConversations(object): # Maemo 4.1's RTComm opens a window for a chat regardless if a # message is received or not, so we need to do some filtering here mergedConv = conv.get_conversation(phoneNumber) - unreadConvs = [ - conversation - for conversation in mergedConv.conversations - if not conversation.isRead and not conversation.isArchived - ] - if not unreadConvs: + newConversations = mergedConv.conversations + newConversations = gvoice.conversations.filter_out_read(newConversations) + newConversations = gvoice.conversations.filter_out_self(newConversations) + newConversations = list(newConversations) + if not newConversations: continue chan = self._connRef()._channel_manager.channel_for_props(props, signal=True)