about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account_timeline/components
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-05-16 20:17:08 +0200
committerGitHub <noreply@github.com>2018-05-16 20:17:08 +0200
commit80aad16e1035a72fec1af56aaac458a35e1f02c5 (patch)
tree3553dbe64377e08ca4ed2a2db62a487472bf8405 /app/javascript/flavours/glitch/features/account_timeline/components
parent9712d59dda848a7bc7fd9edb814c16717aa9ba6d (diff)
parent784712791da8c7d21afa62a3bf6a8fdac8c27a80 (diff)
Merge pull request #405 from ThibG/glitch-soc/features/dm-from-menu
[Glitch] Feature: Direct message from menu
Diffstat (limited to 'app/javascript/flavours/glitch/features/account_timeline/components')
-rw-r--r--app/javascript/flavours/glitch/features/account_timeline/components/header.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/header.js b/app/javascript/flavours/glitch/features/account_timeline/components/header.js
index 39a1850d7..a1434b8dd 100644
--- a/app/javascript/flavours/glitch/features/account_timeline/components/header.js
+++ b/app/javascript/flavours/glitch/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}