Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oelmekki/43439b8bf223ea24c3c9 to your computer and use it in GitHub Desktop.
Save oelmekki/43439b8bf223ea24c3c9 to your computer and use it in GitHub Desktop.
From dc02b1cc6ec8b8c3c2693c1f91892e13bafefef8 Mon Sep 17 00:00:00 2001
From: Olivier El Mekki <olivier@el-mekki.com>
Date: Sun, 17 May 2015 19:18:32 +0200
Subject: [PATCH] ADD tagline in slack message
---
app/Console/Commands/PostUpvotes.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/Console/Commands/PostUpvotes.php b/app/Console/Commands/PostUpvotes.php
index 09bd98f..9b8d010 100644
--- a/app/Console/Commands/PostUpvotes.php
+++ b/app/Console/Commands/PostUpvotes.php
@@ -77,6 +77,7 @@ class PostUpvotes extends Command {
$voteTime = strtotime($json["votes"][$i]["created_at"]);
$productName = $json["votes"][$i]["post"]["name"];
$productURL = $json["votes"][$i]["post"]["discussion_url"];
+ $productTagline = $json["votes"][$i]["post"]["tagline"];
$estimateTime = time() - $voteTime;
if ($estimateTime < 600){
@@ -85,7 +86,7 @@ class PostUpvotes extends Command {
$url = $user->slack_url;
$ch = curl_init($url);
$jsonData = array(
- 'text' => $user->name.' upvoted '.'<'.$productURL.'|'.$productName.'>'.' on Product Hunt ',
+ 'text' => $user->name.' upvoted '.'<'.$productURL.'|'.$productName.'>'.' on Product Hunt : '.$productTagline,
'icon_url' => 'http://codecondo.com/wp-content/uploads/2014/08/Product-Hunt-Logo.png',
'username' => 'slack-hunts'
);
--
2.1.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment