summaryrefslogtreecommitdiff
path: root/alot/db/thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/db/thread.py')
-rw-r--r--alot/db/thread.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/alot/db/thread.py b/alot/db/thread.py
index fe7ea10f..0943d815 100644
--- a/alot/db/thread.py
+++ b/alot/db/thread.py
@@ -174,14 +174,14 @@ class Thread(object):
return self._authors
- def get_authors_string(self, own_addrs=None, replace_own=None):
+ def get_authors_string(self, own_accts=None, replace_own=None):
"""
returns a string of comma-separated authors
Depending on settings, it will substitute "me" for author name if
address is user's own.
- :param own_addrs: list of own email addresses to replace
- :type own_addrs: list of str
+ :param own_accts: list of own accounts to replace
+ :type own_accts: list of :class:`Account`
:param replace_own: whether or not to actually do replacement
:type replace_own: bool
:rtype: str
@@ -189,12 +189,14 @@ class Thread(object):
if replace_own is None:
replace_own = settings.get('thread_authors_replace_me')
if replace_own:
- if own_addrs is None:
- own_addrs = settings.get_addresses()
+ if own_accts is None:
+ own_accts = settings.get_accounts()
authorslist = []
for aname, aaddress in self.get_authors():
- if aaddress in own_addrs:
- aname = settings.get('thread_authors_me')
+ for account in own_accts:
+ if account.matches_address(aaddress):
+ aname = settings.get('thread_authors_me')
+ break
if not aname:
aname = aaddress
if aname not in authorslist: