mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Mastodon: TWBlue should be able to ignore deleted messages, so it will load everything else properly
This commit is contained in:
parent
8b5c47da28
commit
e835274ce9
@ -14,6 +14,7 @@ TWBlue Changelog
|
|||||||
* Added possibility to vote in polls.
|
* Added possibility to vote in polls.
|
||||||
* Added posts search. Take into account that Mastodon instances should be configured with full text search enabled. Search for posts only include posts the logged-in user has interacted with. ([#541](https://github.com/MCV-Software/TWBlue/pull/541))
|
* Added posts search. Take into account that Mastodon instances should be configured with full text search enabled. Search for posts only include posts the logged-in user has interacted with. ([#541](https://github.com/MCV-Software/TWBlue/pull/541))
|
||||||
* Added user autocompletion settings in account settings dialog, so it is possible to ask TWBlue to scan mastodon accounts and add people from followers and following buffers. For now, user autocompletion can be used only when composing new posts or replies.
|
* Added user autocompletion settings in account settings dialog, so it is possible to ask TWBlue to scan mastodon accounts and add people from followers and following buffers. For now, user autocompletion can be used only when composing new posts or replies.
|
||||||
|
* TWBlue should be able to ignore deleted direct messages or messages from deleted accounts. Previously, a direct message that no longer existed in the instance caused errors when loading the direct messages buffer and could potentially affect notifications as well.
|
||||||
|
|
||||||
## changes in version 2023.4.13
|
## changes in version 2023.4.13
|
||||||
|
|
||||||
|
@ -12,3 +12,4 @@
|
|||||||
* Added possibility to vote in polls.
|
* Added possibility to vote in polls.
|
||||||
* Added posts search. Take into account that Mastodon instances should be configured with full text search enabled. Search for posts only include posts the logged-in user has interacted with. ([#541](https://github.com/MCV-Software/TWBlue/pull/541))
|
* Added posts search. Take into account that Mastodon instances should be configured with full text search enabled. Search for posts only include posts the logged-in user has interacted with. ([#541](https://github.com/MCV-Software/TWBlue/pull/541))
|
||||||
* Added user autocompletion settings in account settings dialog, so it is possible to ask TWBlue to scan mastodon accounts and add people from followers and following buffers. For now, user autocompletion can be used only when composing new posts or replies.
|
* Added user autocompletion settings in account settings dialog, so it is possible to ask TWBlue to scan mastodon accounts and add people from followers and following buffers. For now, user autocompletion can be used only when composing new posts or replies.
|
||||||
|
* TWBlue should be able to ignore deleted direct messages or messages from deleted accounts. Previously, a direct message that no longer existed in the instance caused errors when loading the direct messages buffer and could potentially affect notifications as well.
|
@ -51,7 +51,7 @@ class ConversationListBuffer(BaseBuffer):
|
|||||||
results = getattr(self.session.api, self.function)(min_id=min_id, limit=count, *self.args, **self.kwargs)
|
results = getattr(self.session.api, self.function)(min_id=min_id, limit=count, *self.args, **self.kwargs)
|
||||||
results.reverse()
|
results.reverse()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.exception("Error %s" % (str(e)))
|
log.exception("Error %s loading %s with args of %r and kwargs of %r" % (str(e), self.function, self.args, self.kwargs))
|
||||||
return
|
return
|
||||||
new_position, number_of_items = self.order_buffer(results)
|
new_position, number_of_items = self.order_buffer(results)
|
||||||
log.debug("Number of items retrieved: %d" % (number_of_items,))
|
log.debug("Number of items retrieved: %d" % (number_of_items,))
|
||||||
@ -110,6 +110,9 @@ class ConversationListBuffer(BaseBuffer):
|
|||||||
self.session.db[self.name] = []
|
self.session.db[self.name] = []
|
||||||
objects = self.session.db[self.name]
|
objects = self.session.db[self.name]
|
||||||
for i in data:
|
for i in data:
|
||||||
|
# Deleted conversations handling.
|
||||||
|
if i.last_status == None:
|
||||||
|
continue
|
||||||
position = self.get_item_position(i)
|
position = self.get_item_position(i)
|
||||||
if position != None:
|
if position != None:
|
||||||
conversation = self.session.db[self.name][position]
|
conversation = self.session.db[self.name][position]
|
||||||
|
Loading…
Reference in New Issue
Block a user