discourse/app/assets/javascripts/discourse/controllers/user_activity_controller.js.coffee
2013-02-05 14:16:51 -05:00

15 lines
468 B
CoffeeScript

Discourse.UserActivityController = Ember.ObjectController.extend
needs: ['composer']
kickOffPrivateMessage: ( ->
if @get('content.openPrivateMessage')
@composePrivateMessage()
).observes('content.openPrivateMessage')
composePrivateMessage: ->
@get('controllers.composer').open
action: Discourse.Composer.PRIVATE_MESSAGE
usernames: @get('content').username
archetypeId: 'private_message'
draftKey: 'new_private_message'