fix: do not silently traceback on mucs without mam
in mucs, there is no "initial message"
This commit is contained in:
parent
3698b20a47
commit
26505c32df
1 changed files with 8 additions and 5 deletions
|
@ -1028,12 +1028,15 @@ class OneToOneTab(ChatTab):
|
||||||
mam_filler = MAMFiller(logger, self, limit)
|
mam_filler = MAMFiller(logger, self, limit)
|
||||||
self.mam_filler = mam_filler
|
self.mam_filler = mam_filler
|
||||||
|
|
||||||
async def fallback_no_mam():
|
if initial is not None:
|
||||||
await mam_filler.done.wait()
|
# If there is an initial message, throw it back into the
|
||||||
if mam_filler.result == 0:
|
# text buffer if it cannot be fetched from mam
|
||||||
self.handle_message(initial)
|
async def fallback_no_mam():
|
||||||
|
await mam_filler.done.wait()
|
||||||
|
if mam_filler.result == 0:
|
||||||
|
self.handle_message(initial)
|
||||||
|
|
||||||
asyncio.ensure_future(fallback_no_mam())
|
asyncio.ensure_future(fallback_no_mam())
|
||||||
elif use_log and initial:
|
elif use_log and initial:
|
||||||
self.handle_message(initial, display=False)
|
self.handle_message(initial, display=False)
|
||||||
asyncio.ensure_future(
|
asyncio.ensure_future(
|
||||||
|
|
Loading…
Reference in a new issue