+ if self.__channelManager.channel_exists(props):
+ continue
+
+ # 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:
+ continue
+
+ chan = self.__channelManager.channel_for_props(props, signal=True)
+
+ @gtk_toolbox.log_exception(_moduleLogger)
+ def _on_connection_change(self, connection, event):
+ """
+ @note Maemo specific
+ """
+ if not self.session.is_logged_in():
+ _moduleLogger.info("Received connection change event when not logged in")
+ return
+ status = event.get_status()
+ error = event.get_error()
+ iap_id = event.get_iap_id()
+ bearer = event.get_bearer_type()
+
+ if status == conic.STATUS_DISCONNECTED:
+ _moduleLogger.info("Disconnecting due to loss of network connection")
+ self.StatusChanged(
+ telepathy.CONNECTION_STATUS_DISCONNECTED,
+ telepathy.CONNECTION_STATUS_REASON_NETWORK_ERROR
+ )
+ try:
+ self._disconnect()
+ except Exception:
+ _moduleLogger.exception("Error durring disconnect")
+ else:
+ _moduleLogger.info("Other status: %r" % (status, ))