Browse Source

add hashtag to tweets

master
Aaron Parecki 7 years ago
parent
commit
700cb8c429
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/Listeners/TweetAcceptedListener.php

+ 2
- 2
app/Listeners/TweetAcceptedListener.php View File

@ -36,7 +36,7 @@ class TweetAcceptedListener implements ShouldQueue
$newMissionStatus = $tweet->mission->complete($tweet->team); $newMissionStatus = $tweet->mission->complete($tweet->team);
if($event->previousMissionStatus == false && $newMissionStatus == true) { if($event->previousMissionStatus == false && $newMissionStatus == true) {
$text = 'Team '.$tweet->team->name.' completed mission '.$tweet->mission_id.'! '.$tweet->mission->hashtag;
$text = 'Team '.$tweet->team->name.' completed mission '.$tweet->mission_id.'! '.$tweet->mission->hashtag.' #spy30';
Log::info("Tweeting: $text"); Log::info("Tweeting: $text");
$params = [ $params = [
@ -60,7 +60,7 @@ class TweetAcceptedListener implements ShouldQueue
->where('m2_transit_center_id', $this_tc) ->where('m2_transit_center_id', $this_tc)
->count(); ->count();
if($other_teams == 0) { if($other_teams == 0) {
$text = 'Team '.$tweet->team->name.' is currently the only team to have visited '.$tweet->transit_center->name.'!';
$text = 'Team '.$tweet->team->name.' is currently the only team to have visited '.$tweet->transit_center->name.'! #spy30';
Log::info("Tweeting: $text"); Log::info("Tweeting: $text");
$params = [ $params = [
'attachment_url' => 'https://twitter.com/'.$tweet->player->twitter.'/status/'.$tweet->tweet_id, 'attachment_url' => 'https://twitter.com/'.$tweet->player->twitter.'/status/'.$tweet->tweet_id,

Loading…
Cancel
Save