2017-06-14 16 views
0

プッシュ通知を登録しました。更新と作成は正常に機能しますが、削除されたイベントは受信できません。Googleカレンダープッシュ通知は削除時に通知されません

私はこの

public function setUpPushNotificationsChannel($lengthHours = 168){ 
     $this->cancelPushNotificationsChannel(); 
     $channel = new Google_Service_Calendar_Channel(); 
     $channel->setId(create_guid()); 
     $channel->setType('web_hook'); 
     $channel->setAddress($this->url); 
     $channel->setToken(Utils::encrypt($this->pushSecret); 
     $dateTime = new DateTime(); 
     $dateTime->add(date_interval_create_from_date_string("$lengthHours hours")); 
     //timestamp is in milliseconds for google -.- 
     $channel->setExpiration($dateTime->getTimestamp() * 1000); 
     //this does not do anything 
     $optParams = array(
      'singleEvents' => true, 
      'showDeleted' =>true, 
     ); 
     $channel = $this->service->events->watch($this->getGoogleCalendarId(),$channel,$optParams); 
     $this->gcalendarSetting->gcalendar_push_channel_id_c = $channel->getId(); 
     $this->gcalendarSetting->gcalendar_resource_id_c = $channel->getResourceId(); 
     $this->gcalendarSetting->save(); 
    } 

のようにチャンネルを設定しています私は多分、私が削除されたイベントのためにいくつかのパラメータをしないのです、Googleドキュメントに何かを見つけることができませんでしたか? ありがとう

答えて

0

この問題は、削除されたイベントではなく、すべてで判明しています。通知はちょうど私がそれをテストしている間、かなり頻繁に到着せず、私はちょうど運が悪かった。変化のほぼ50%がプッシュされていないようですが、それは非常に不満です。

関連する問題