|
@@ 16-20 (lines=5) @@
|
| 13 |
|
public function eventsAction($chatId = 0) { |
| 14 |
|
$chatId = (int) $chatId; |
| 15 |
|
$result = new Server\Result(); |
| 16 |
|
if (!$chatId || !($chat = \Chats\Chat::get($chatId))) { |
| 17 |
|
$result->success = false; |
| 18 |
|
$result->content = 'Такого чата не существует'; |
| 19 |
|
$result->send(); |
| 20 |
|
} |
| 21 |
|
$where = [ |
| 22 |
|
['chat_id', $chatId], |
| 23 |
|
['delete', 0] |
|
@@ 109-113 (lines=5) @@
|
| 106 |
|
public function sendFormAction($chatId = 0) { |
| 107 |
|
$chatId = (int) $chatId; |
| 108 |
|
$result = new Server\Result(); |
| 109 |
|
if (!$chatId || !($chat = \Chats\Chat::get($chatId))) { |
| 110 |
|
$result->success = false; |
| 111 |
|
$result->content = 'Такого чата не существует'; |
| 112 |
|
$result->send(); |
| 113 |
|
} |
| 114 |
|
if (!Users\User::$cur->id) { |
| 115 |
|
$result->success = false; |
| 116 |
|
$result->content = 'Вы не авторизованы'; |