mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
25 lines
734 B
JavaScript
25 lines
734 B
JavaScript
/**
|
|
This controller handles actions related to a user's private messages.
|
|
|
|
@class UserPrivateMessagesController
|
|
@extends Discourse.ObjectController
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.UserPrivateMessagesController = Discourse.ObjectController.extend({
|
|
|
|
editPreferences: function() {
|
|
return Discourse.URL.routeTo("/users/" + (this.get('content.username_lower')) + "/preferences");
|
|
},
|
|
|
|
composePrivateMessage: function() {
|
|
var composerController;
|
|
composerController = Discourse.get('router.composerController');
|
|
return composerController.open({
|
|
action: Discourse.Composer.PRIVATE_MESSAGE,
|
|
archetypeId: 'private_message',
|
|
draftKey: 'new_private_message'
|
|
});
|
|
}
|
|
|
|
});
|