예제 #1
0
 private function restoreGroup($groupId)
 {
     // load token and team uri from settings
     $token = Seat::get('slack_token');
     if ($token == null) {
         throw new SlackSettingException("missing slack_token in settings");
     }
     $slackApi = new SlackApi($token);
     $apiGroup = $slackApi->info($groupId, true);
     SlackChannel::create(['id' => $apiGroup['id'], 'name' => $apiGroup['name'], 'is_group' => true]);
 }
예제 #2
0
 /**
  * @expectedException Seat\Slackbot\Exceptions\SlackGroupException
  */
 public function testInfoGroupException()
 {
     $slackChannelId = "C2Z4D897";
     $this->slackApi->info($slackChannelId, true);
 }