mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 09:45:24 -04:00
Keep Cc recipients in reply-all
* fix: populate window._myEmailAddress from the active email account * fix: keep Cc recipients in reply-all when own address is empty or unknown * test: cover reply-all recipient building (issue #360)
This commit is contained in:
@@ -492,6 +492,15 @@ function _libCacheWriteBack() {
|
||||
// Simple global rather than cross-module import to keep coupling minimal.
|
||||
function _publishActiveAccount() {
|
||||
try { window.__odysseusActiveEmailAccount = state._libAccountId || null; } catch (_) {}
|
||||
// Publish the active account's own address so reply-all can exclude us from
|
||||
// the recipient list. This global was read in emailInbox.js but never set.
|
||||
try {
|
||||
const accts = state._libAccounts || [];
|
||||
const active = accts.find(a => a && a.id === state._libAccountId)
|
||||
|| accts.find(a => a && a.is_default)
|
||||
|| accts[0];
|
||||
window._myEmailAddress = (active && (active.from_address || active.imap_user)) || '';
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
export function initEmailLibrary(config) {
|
||||
|
||||
Reference in New Issue
Block a user