| @@ 17-21 (lines=5) @@ | ||
| 14 | {
|
|
| 15 | $chatId = (int) $chatId; |
|
| 16 | $result = new Server\Result(); |
|
| 17 | if (!$chatId || !($chat = \Chats\Chat::get($chatId))) {
|
|
| 18 | $result->success = false; |
|
| 19 | $result->content = 'Такого чата не существует'; |
|
| 20 | $result->send(); |
|
| 21 | } |
|
| 22 | $where = [ |
|
| 23 | ['chat_id', $chatId], |
|
| 24 | ['delete', 0] |
|
| @@ 119-123 (lines=5) @@ | ||
| 116 | {
|
|
| 117 | $chatId = (int) $chatId; |
|
| 118 | $result = new Server\Result(); |
|
| 119 | if (!$chatId || !($chat = \Chats\Chat::get($chatId))) {
|
|
| 120 | $result->success = false; |
|
| 121 | $result->content = 'Такого чата не существует'; |
|
| 122 | $result->send(); |
|
| 123 | } |
|
| 124 | if (!Users\User::$cur->id) {
|
|
| 125 | $result->success = false; |
|
| 126 | $result->content = 'Вы не авторизованы'; |
|