diff --git a/doc/changelog.md b/doc/changelog.md index dd5ec26e..4f58faf2 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -2,6 +2,10 @@ ## changes in this version +* If the sent direct messages buffer is hidden, TWBlue should keep loading everything as expected. ([#246](https://github.com/manuelcortez/TWBlue/issues/246)) + +## Changes in version 0.94 + * Added an option in the global settings dialog to disable the Streaming features of TWBlue. TWBlue will remove all Streaming features after August 16, so this option will give people an idea about how it will be. ([#219](https://github.com/manuelcortez/TWBlue/issues/219)) * Due to Twitter API changes, Switched authorisation method to Pin-code based authorisation. When you add new accounts to TWBlue, you will be required to paste a code displayed in the Twitter website in order to grant access to TWBlue. ([#216](https://github.com/manuelcortez/TWBlue/issues/216)) * In order to comply with latest Twitter changes, TWBlue has switched to the new method used to send and receive direct messages, according to issue [#215.](https://github.com/manuelcortez/twblue/issues/215) diff --git a/src/sessionmanager/session.py b/src/sessionmanager/session.py index 74c66575..ba7fe203 100644 --- a/src/sessionmanager/session.py +++ b/src/sessionmanager/session.py @@ -116,7 +116,7 @@ class Session(object): self.db["direct_messages"]["items"] = [] for i in data: if i["message_create"]["sender_id"] == self.db["user_id"]: - if utils.find_item(i["id"], self.db["sent_direct_messages"]["items"]) == None: + if self.db.has_key("sent_direct_messages") and utils.find_item(i["id"], self.db["sent_direct_messages"]["items"]) == None: if self.settings["general"]["reverse_timelines"] == False: self.db["sent_direct_messages"]["items"].append(i) else: self.db["sent_direct_messages"]["items"].insert(0, i) sent = sent+1