diff options
author | mathieui <mathieui@mathieui.net> | 2020-05-22 17:09:17 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-05-23 16:10:13 +0200 |
commit | 29eef159d50c836fbd7a27770775d63700dc7f19 (patch) | |
tree | ae17eb3f41a87974b6c9af0f3335ffa5a4b5fe17 /poezio/mam.py | |
parent | d3655c4c3520f1a86af5ccf7b816076ae1d18312 (diff) | |
download | poezio-29eef159d50c836fbd7a27770775d63700dc7f19.tar.gz poezio-29eef159d50c836fbd7a27770775d63700dc7f19.tar.bz2 poezio-29eef159d50c836fbd7a27770775d63700dc7f19.tar.xz poezio-29eef159d50c836fbd7a27770775d63700dc7f19.zip |
Fix some edge cases of MAM history fetch
- Wait until we receive our own MUC presence to fetch history
- Fix /reconnect weirdness
Diffstat (limited to 'poezio/mam.py')
-rw-r--r-- | poezio/mam.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/poezio/mam.py b/poezio/mam.py index edd1e462..ee5b1be8 100644 --- a/poezio/mam.py +++ b/poezio/mam.py @@ -247,10 +247,10 @@ def schedule_tab_open(tab: tabs.Tab) -> None: async def on_tab_open(tab: tabs.Tab) -> None: gap = tab._text_buffer.find_last_gap_muc() - if gap is not None: - await fill_missing_history(tab, gap) - else: + if gap is None or not gap.leave_message: await on_new_tab_open(tab) + else: + await fill_missing_history(tab, gap) def schedule_scroll_up(tab: tabs.Tab) -> None: |