Skip to content

Instantly share code, notes, and snippets.

@plehoux

plehoux/demo.js Secret

Created March 5, 2019 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plehoux/2c3a8d2de6e28db6f9ff76c56150ffe0 to your computer and use it in GitHub Desktop.
Save plehoux/2c3a8d2de6e28db6f9ff76c56150ffe0 to your computer and use it in GitHub Desktop.
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