function receivePosts() { global $USER; $isPost = false; foreach (Chat::GetMyPosts($USER->Browsers[0]->SystemId, $USER->Browsers[0]->ChatId) as $post) { $senderName = !empty($post->SenderName) ? $post->SenderName : LocalizationManager::$TranslationStrings["client_guest"] . " " . Visitor::GetNoName($USER->UserId . Communication::GetIP()); $USER->AddFunctionCall($post->GetCommand($senderName), false); $isPost = true; } return $isPost; }
function buildNewPosts() { foreach (Chat::GetMyPosts(Server::$Operators[CALLER_SYSTEM_ID]->SystemId) as $post) { Server::$Response->Posts .= $post->GetXml(); Server::$Operators[CALLER_SYSTEM_ID]->SetRepostTime($post->ReceiverGroup, $post->Created); } }