Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
The docs and variable names now better match the rest of the project
Browse files Browse the repository at this point in the history
  • Loading branch information
zyberspace committed Feb 11, 2016
1 parent 1dbb974 commit 083c5e7
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions lib/Zyberspace/Telegram/Cli/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,32 +374,40 @@ public function getHistory($peer, $limit = null, $offset = null)
}

/**
* Send Picture to peer
* Send picture to peer
*
* @param string $peer The peer, gets escaped with escapePeer()
* @param string $pic Picture Path
* @param string $peer The peer, gets escaped with escapePeer()
* @param string $path The picture path, gets formatted with formatFileName()
* @return boolean
*
* @uses exec()
* @uses escapePeer()
* @uses formatFileName()
*/
public function sendPicture($peer, $pic)
public function sendPicture($peer, $path)
{
$peer = $this->escapePeer($peer);
$picture = $this->formatFileName($pic);
$formattedPath = $this->formatFileName($path);

return $this->exec('send_photo ' . $peer . ' ' . $picture);
return $this->exec('send_photo ' . $peer . ' ' . $formattedPath);
}

/**
* Send File to peer
* Send file to peer
*
* @param string $peer The peer, gets escaped with escapePeer()
* @param string $pic File Path
* @param string $peer The peer, gets escaped with escapePeer()
* @param string $path The file path, gets formatted with formatFileName()
* @return boolean
*
* @uses exec()
* @uses escapePeer()
* @uses formatFileName()
*/
public function sendFile($peer, $file)
public function sendFile($peer, $path)
{
$peer = $this->escapePeer($peer);
$atFile = $this->formatFileName($file);
$formattedPath = $this->formatFileName($path);

return $this->exec('send_file ' . $peer . ' ' . $atFile);
return $this->exec('send_file ' . $peer . ' ' . $formattedPath);
}
}

0 comments on commit 083c5e7

Please sign in to comment.