Get the real thread of an article

Side effect: fix the bug of incorrect date by using boobmsg show
This commit is contained in:
Florent 2012-11-07 17:36:35 +01:00
commit c1d19e40f8

View file

@ -40,12 +40,17 @@ class GenericNewspaperBackend(BaseBackend, ICapMessages):
URL2ID = None
RSSSIZE = 0
def _get_thread(self, id):
for thread in self.iter_threads():
if thread.id == id:
return thread
def get_thread(self, _id):
if isinstance(_id, Thread):
thread = _id
id = thread.id
else:
thread = None
thread = self._get_thread(_id)
id = _id
with self.browser: