self._process_refresh(addressbook, added, removed)
def _process_refresh(self, addressbook, added, removed):
+ _moduleLogger.info("Added: %r, Removed: %r" % (len(added), len(removed)))
connection = self._conn
handlesAdded = [
handle.create_handle(connection, "contact", contactId, phoneNumber)
try:
mergedConversations = self._conn.session.voicemails.get_conversation(self._contactKey)
except KeyError:
- _moduleLogger.debug("Nothing in the conversation yet for %r" % (self._contactKey, ))
+ _moduleLogger.debug("No voicemails in the conversation yet for %r" % (self._contactKey, ))
else:
self._report_conversation(mergedConversations)
try:
mergedConversations = self._conn.session.texts.get_conversation(self._contactKey)
except KeyError:
- _moduleLogger.debug("Nothing in the conversation yet for %r" % (self._contactKey, ))
+ _moduleLogger.debug("No texts conversation yet for %r" % (self._contactKey, ))
else:
self._report_conversation(mergedConversations)
# before the last one sent because that creates a race condition of two
# people sending at about the same time, which happens quite a bit
newConversations = mergedConversations.conversations
+ if not newConversations:
+ _moduleLogger.debug(
+ "No messages ended up existing for %r" % (self._contactKey, )
+ )
+ return
newConversations = self._filter_out_reported(newConversations)
newConversations = self._filter_out_read(newConversations)
newConversations = list(newConversations)