Mailspring/internal_packages/message-list/lib/main.cjsx
Ben Gotow 4be05ff754 feat(tracking-pixels): New MessageStore extension cuts out tracking pixels you've *sent* so you don't trigger them
Summary:
- Remove thread_participants prop, we don't use them anywhere and the underscore-case is ugly.

- Move autolinker into extension, update autolinker to 0.18.1 for phone number support

- document message.coffee, add isFromMe()

- Add tracking pixel extension that removes pixels from mail you *send*. Maybe more features later.

Test Plan: Run 1 new test! (woo...)

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1787
2015-07-23 10:57:13 -07:00

46 lines
1.6 KiB
CoffeeScript

MessageList = require "./message-list"
MessageToolbarItems = require "./message-toolbar-items"
{ComponentRegistry,
MessageStore,
WorkspaceStore} = require 'nylas-exports'
SidebarThreadParticipants = require "./sidebar-thread-participants"
ThreadStarButton = require './thread-star-button'
ThreadArchiveButton = require './thread-archive-button'
AutolinkerExtension = require './plugins/autolinker-extension'
TrackingPixelsExtension = require './plugins/tracking-pixels-extension'
module.exports =
item: null # The DOM item the main React component renders into
activate: (@state={}) ->
# Register Message List Actions we provide globally
ComponentRegistry.register MessageList,
location: WorkspaceStore.Location.MessageList
ComponentRegistry.register MessageToolbarItems,
location: WorkspaceStore.Location.MessageList.Toolbar
ComponentRegistry.register SidebarThreadParticipants,
location: WorkspaceStore.Location.MessageListSidebar
ComponentRegistry.register ThreadStarButton,
role: 'message:Toolbar'
ComponentRegistry.register ThreadArchiveButton,
role: 'message:Toolbar'
MessageStore.registerExtension(AutolinkerExtension)
MessageStore.registerExtension(TrackingPixelsExtension)
deactivate: ->
ComponentRegistry.unregister MessageList
ComponentRegistry.unregister ThreadStarButton
ComponentRegistry.unregister ThreadArchiveButton
ComponentRegistry.unregister MessageToolbarItems
ComponentRegistry.unregister SidebarThreadParticipants
MessageStore.unregisterExtension(AutolinkerExtension)
MessageStore.unregisterExtension(TrackingPixelsExtension)
serialize: -> @state