mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
28 lines
741 B
JavaScript
28 lines
741 B
JavaScript
/**
|
|
This controller supports all actions on a user's activity stream
|
|
|
|
@class UserActivityController
|
|
@extends Discourse.ObjectController
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.UserActivityController = Discourse.ObjectController.extend({
|
|
needs: ['composer'],
|
|
|
|
kickOffPrivateMessage: (function() {
|
|
if (this.get('content.openPrivateMessage')) {
|
|
this.composePrivateMessage();
|
|
}
|
|
}).observes('content.openPrivateMessage'),
|
|
|
|
composePrivateMessage: function() {
|
|
return this.get('controllers.composer').open({
|
|
action: Discourse.Composer.PRIVATE_MESSAGE,
|
|
usernames: this.get('content').username,
|
|
archetypeId: 'private_message',
|
|
draftKey: 'new_private_message'
|
|
});
|
|
}
|
|
});
|
|
|
|
|