Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db: thread: Fix 'oldest subject' thread names #1591

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

kbingham
Copy link
Contributor

The notmuch2 bindings change now means the retrieval of the oldest
subject from a thread needs to be reworked.

When the config option is chosen to use the oldest subject:

  # Set thread subjects to the first (oldest) message
  thread_subject = oldest

The following error is generated:

    File "/home/kbingham/iob/alot/alot/db/thread.py", line 50, in _refresh
      first_msg = list(thread.get_toplevel_messages())[0]
  AttributeError: 'Thread' object has no attribute 'get_toplevel_messages'

Update the code to use the correct interface on both the Thread and
Message objects.

The notmuch2 bindings change now means the retrieval of the oldest
subject from a thread needs to be reworked.

When the config option is chosen to use the oldest subject:
  # Set thread subjects to the first (oldest) message
  thread_subject = oldest

The following error is generated:

    File "/home/kbingham/iob/alot/alot/db/thread.py", line 50, in _refresh
      first_msg = list(thread.get_toplevel_messages())[0]
  AttributeError: 'Thread' object has no attribute 'get_toplevel_messages'

Update the code to use the correct interface on both the Thread and
Message objects.

Signed-off-by: Kieran Bingham <[email protected]>
Copy link
Owner

@pazz pazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one, thanks!

@pazz pazz merged commit a3b6018 into pazz:master Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants