diff --git a/weboob/tools/capabilities/messages/GenericBackend.py b/weboob/tools/capabilities/messages/GenericBackend.py index 2ae28d2f..362879c7 100644 --- a/weboob/tools/capabilities/messages/GenericBackend.py +++ b/weboob/tools/capabilities/messages/GenericBackend.py @@ -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: