public function get chat_id result this- api messages getHistory array

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
public function get($chat_id) {
$result = $this->api("messages.getHistory", array(
"offset" => $this->last_id,
"chat_id" => $chat_id,
"rev" => "1",
"count" => "200"
));
$res = (int) $result["response"][count($result["response"]) - 1]["mid"];
if ($res > 0) $this->last_id = $res;
log::write("LAST_ID: " . $this->last_id . " | RES: " . $res);
return $result;
}