Fix display of email thread activities

This commit is contained in:
Eric Schultz 2019-01-30 15:34:45 -06:00 committed by Eric Schultz
parent a7281bd683
commit 9b9ac3d5b6

View file

@ -100,16 +100,15 @@ exports.SupporterNote = (data, state) => {
exports.SupporterEmail = (data, state) => {
var jd = data.json_data
var canView = jd.from === state.gmail.from$()
var canView = false
var body = [h('span', `Subject: ${jd.subject}`), h('br')]
var thread = h('a', {props: {href: '#'}, on: {click: [state.threadId$, jd.gmail_thread_id]}}, 'View thread')
var signIn = h('small', [
h('a', {props: {href: '#'}, on: {click: state.gmail.newSignIn$}}, 'Sign in')
, ` as ${jd.from} to view thread`])
return {
title: `Email thread started by ${jd.from}`
, icon: 'fa-envelope'
, body: canView ? R.concat(body, thread) : R.concat(body, signIn)
, body: body
// , body: canView ? R.concat(body, thread) : R.concat(body, signIn)
}
}