Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
getConversations fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mgp25 committed Jul 25, 2015
1 parent 5b1ed8d commit 28f0c40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/snapchat.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,9 @@ public function sendMessage($tos, $text){
public function getConversations()
{
$updates = $this->getUpdates();
$offset = end($updates['data']->conversations_response)->iter_token;
$last = end($updates['data']->conversations_response);
if (isset($last->iter_token))
$offset = $last->iter_token;
$convos = $updates['data']->conversations_response;
while(strlen($offset) > 0){
$timestamp = parent::timestamp();
Expand Down

0 comments on commit 28f0c40

Please sign in to comment.