title: Check if event is triggered in all channels in Pusher
body: <p>I am building a live bidding website using Php and <a href="http://pusher.com/" rel="nofollow">Pusher</a>. There is a countdown timer in the site. </p>
  
  <p>If the timer goes below 15 secs and if someone bids for a auction, the timer is reset back to 15 again. I am using Pusher to update timer in all open browsers. When the timer reaches 0 a function is called to end the auction.</p>
  
  <p>Here is the problem I am facing:</p>
  
  <p>If someone bids when the timer is around 1 secs left, the timer is updated in the browser in which the bid occurred. But as Pusher takes around a second to update the other browsers, the timer ends on other computer and the function to end the auction is called. </p>
  
  <p>Here is sample code on what I am currently doing:</p>
  
  <pre><code>    var pusher = new Pusher('key');
  
      channel = pusher.subscribe('wppa');
  
      pusher.connection.bind('connected', function(){
  
      });
  
      channel.bind('bid_added_event', function(response) {
          StreamedAuction.update(response, AuctionModel); 
      });
  
      channel.bind('end_auction_event', function(response) {
          StreamedAuction.end(response, AuctionModel);
      });
  
      channel.bind('update_timer_event', function(response){
          StreamedAuction.updateEndDate(response, AuctionModel);
      });
  </code></pre>
  
  <p>If someone bids and the timer is less than 15 <code>updat_timer_event</code> is called to update the timer in all channels.</p>
  
  <p>If the timer reaches 0, the the <code>end auction_event</code> is called. The problem is if someone bids when timer is 1 sec, the auction is ended even before the <code>update_timer_event</code> is called.</p>
  
  <p>I am wondering if there is a way in pusher where you could listen if the event is fired in all channels. If this is possible the I was thinking I could do something like:</p>
  
  <pre><code>if the event is fired in all browsers
     then end the auction
  else
     reset the counter to 15 in all channels
     as somebody bided and the auction ending event wasnt fired from
     one of the channel
  </code></pre>
  
  <p>Please let me know if you require more details or code.</p>
  
  <p>Thanks.</p>