Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/notif-utils.js
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | const { | ||||
threadType, | threadType, | ||||
parentThreadInfo, | parentThreadInfo, | ||||
childThreadName, | childThreadName, | ||||
childThreadUIName, | childThreadUIName, | ||||
} = input; | } = input; | ||||
const prefix = ET`${ET.user({ userInfo: creator })}`; | const prefix = ET`${ET.user({ userInfo: creator })}`; | ||||
let body = `created a new ${threadNoun(threadType)}`; | let body = `created a new ${threadNoun(threadType, parentThreadInfo.id)}`; | ||||
if (parentThreadInfo.name) { | if (parentThreadInfo.name) { | ||||
body = ET`${body} in ${parentThreadInfo.name}`; | body = ET`${body} in ${parentThreadInfo.name}`; | ||||
} | } | ||||
let merged = ET`${prefix} ${body}`; | let merged = ET`${prefix} ${body}`; | ||||
if (childThreadName) { | if (childThreadName) { | ||||
merged = ET`${merged} called "${childThreadName}"`; | merged = ET`${merged} called "${childThreadName}"`; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |