1
0
mirror of https://github.com/danog/magnaluna.git synced 2024-11-26 11:34:39 +01:00
This commit is contained in:
Daniil Gentili 2020-03-01 19:08:58 +01:00
parent 0c03057011
commit d3d9e21e3b
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -96,20 +96,9 @@ class StatusLoop extends ResumableSignalLoop
if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
try {
/*yield $this->messages->sendMedia([
'reply_to_msg_id' => $this->times[$call->getOtherID()][1],
'peer' => $call->getOtherID(), 'message' => 'Call statistics by {$this->me}',
'media' => [
'_' => 'inputMediaUploadedDocument',
'file' => "/tmp/stats".$call->getCallID()['id'].".txt",
'attributes' => [
['_' => 'documentAttributeFilename', 'file_name' => "stats".$call->getCallID()['id'].".txt"]
]
],
]);*/
yield $MadelineProto->messages->sendMedia([
'reply_to_msg_id' => $this->call->mId,
'peer' => $call->getOtherID(), 'message' => "Debug info by {$this->me}",
'peer' => $call->getOtherID(), 'message' => "Debug info by {$this->API->getEventHandler()->getMe()}",
'media' => [
'_' => 'inputMediaUploadedDocument',
'file' => '/tmp/logs'.$call->getCallID()['id'].'.log',
@ -151,6 +140,10 @@ class PonyEventHandler extends \danog\MadelineProto\EventHandler
{
$this->me = '@' . ((yield $this->getSelf()['username']) ?? 'magnaluna');
}
public function getMe(): string
{
return $this->me;
}
public function getReportPeers(): array
{
return self::ADMINS;