-
-
Save plehoux/2c3a8d2de6e28db6f9ff76c56150ffe0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Missive.on('change:conversations', (ids) => { | |
Missive.fetchConversation(ids, ['authors','latest_message']).then((conversations) => { | |
if (conversations.length != 1) { | |
// Do nothing if multiple conversations are selected. | |
return | |
} | |
let addressFields = Missive.getEmailAddresses(conversations[0]) | |
for (let addressField of addressFields) { | |
let { address, name } = addressField | |
console.log(name, address) | |
// Code could ignore your own business domain name | |
// Code could query your backend & update the iframe content | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment