mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
22 lines
604 B
JavaScript
22 lines
604 B
JavaScript
|
|
export function pluginFor(id) {
|
|
const openTrackingId = NylasEnv.packages.pluginIdFor('open-tracking')
|
|
const linkTrackingId = NylasEnv.packages.pluginIdFor('link-tracking')
|
|
if (id === openTrackingId) {
|
|
return {
|
|
name: "open",
|
|
predicate: "opened",
|
|
iconName: "icon-activity-mailopen.png",
|
|
notificationInterval: 600000, // 10 minutes in ms
|
|
}
|
|
}
|
|
if (id === linkTrackingId) {
|
|
return {
|
|
name: "link",
|
|
predicate: "clicked",
|
|
iconName: "icon-activity-linkopen.png",
|
|
notificationInterval: 10000, // 10 seconds in ms
|
|
}
|
|
}
|
|
return undefined
|
|
}
|