From e5e9b24af5f6429ff000ae5c8f0fb9fc318ed09a Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Wed, 9 Sep 2020 21:00:21 +0100 Subject: [PATCH] updates --- komrade/backend/messages.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/komrade/backend/messages.py b/komrade/backend/messages.py index 807d3fa..a169d18 100644 --- a/komrade/backend/messages.py +++ b/komrade/backend/messages.py @@ -199,9 +199,14 @@ class Message(Logger): @property def messages(self): # move through msgs recursively - yield self - if self.has_embedded_msg: - yield self.messages + def _msgs(): + msg=self + while True: + yield msg + if msg.has_embedded_msg: + msg=msg.msg + break + return list(_msgs()) @property def route(self):