pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
697 stars 165 forks source link

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

Closed kbingham closed 2 years ago

kbingham commented 2 years ago

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.