mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-01 01:41:47 +08:00 
			
		
		
		
	update telegram
This commit is contained in:
		| @@ -37,9 +37,10 @@ class TelegramController extends Controller | |||||||
|         $obj = new \StdClass(); |         $obj = new \StdClass(); | ||||||
|         $obj->is_private = $data['message']['chat']['type'] === 'private' ? true : false; |         $obj->is_private = $data['message']['chat']['type'] === 'private' ? true : false; | ||||||
|         $text = explode(' ', $data['message']['text']); |         $text = explode(' ', $data['message']['text']); | ||||||
|         $obj->command = $text[0] || ''; |         $obj->command = $text[0]; | ||||||
|         $obj->args = array_slice($text, 1) || []; |         $obj->args = array_slice($text, 1); | ||||||
|         $obj->chat_id = $data['message']['chat']['id'] || ''; |         $obj->chat_id = $data['message']['chat']['id']; | ||||||
|  |         $obj->message_id = $data['message']['message_id']; | ||||||
|         return $obj; |         return $obj; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -60,5 +61,7 @@ class TelegramController extends Controller | |||||||
|         if (!$user->save()) { |         if (!$user->save()) { | ||||||
|             abort(500, '设置失败'); |             abort(500, '设置失败'); | ||||||
|         } |         } | ||||||
|  |         $telegramService = new TelegramService(); | ||||||
|  |         $telegramService->sendMessage($msg->chat_id, '绑定成功'); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user