about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_timeline/components/header.js
diff options
context:
space:
mode:
authorEmelia Smith <ThisIsMissEm@users.noreply.github.com>2018-03-29 19:08:34 +0200
committerEugen Rochko <eugen@zeonfederated.com>2018-03-29 19:08:34 +0200
commitd1f34151aee564bb1e60ee48107797681c869a81 (patch)
tree101044875b49579d890d95463eee82c647ea3ebe /app/javascript/mastodon/features/account_timeline/components/header.js
parentf1f846045f26518525d5484ed9e782b73086ebe4 (diff)
Feature: Direct message from menu (#6956)
* Implement ability to send direct messages from the user menu

* Implement message warning users that direct messages are visible to all mentioned users

* Update locales
Diffstat (limited to 'app/javascript/mastodon/features/account_timeline/components/header.js')
-rw-r--r--app/javascript/mastodon/features/account_timeline/components/header.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/account_timeline/components/header.js b/app/javascript/mastodon/features/account_timeline/components/header.js
index 6b88a7a0c..789999dce 100644
--- a/app/javascript/mastodon/features/account_timeline/components/header.js
+++ b/app/javascript/mastodon/features/account_timeline/components/header.js
@@ -16,6 +16,7 @@ export default class Header extends ImmutablePureComponent {
     onFollow: PropTypes.func.isRequired,
     onBlock: PropTypes.func.isRequired,
     onMention: PropTypes.func.isRequired,
+    onDirect: PropTypes.func.isRequired,
     onReblogToggle: PropTypes.func.isRequired,
     onReport: PropTypes.func.isRequired,
     onMute: PropTypes.func.isRequired,
@@ -40,6 +41,10 @@ export default class Header extends ImmutablePureComponent {
     this.props.onMention(this.props.account, this.context.router.history);
   }
 
+  handleDirect = () => {
+    this.props.onDirect(this.props.account, this.context.router.history);
+  }
+
   handleReport = () => {
     this.props.onReport(this.props.account);
   }
@@ -89,6 +94,7 @@ export default class Header extends ImmutablePureComponent {
           account={account}
           onBlock={this.handleBlock}
           onMention={this.handleMention}
+          onDirect={this.handleDirect}
           onReblogToggle={this.handleReblogToggle}
           onReport={this.handleReport}
           onMute={this.handleMute}