mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update: set default url to app url
This commit is contained in:
		| @@ -54,12 +54,12 @@ class ConfigController extends Controller | ||||
|  | ||||
|     public function setTelegramWebhook(Request $request) | ||||
|     { | ||||
|         $appUrl = config('v2board.app_url'); | ||||
|         if (!$appUrl) abort(500, '请先配置正确的站点地址'); | ||||
|         $telegramService = new TelegramService($request->input('telegram_bot_token')); | ||||
|         $telegramService->getMe(); | ||||
|         $telegramService->setWebhook( | ||||
|             url( | ||||
|                 '/api/v1/guest/telegram/webhook?access_token=' . md5(config('v2board.telegram_bot_token', $request->input('telegram_bot_token'))) | ||||
|             ) | ||||
|             $appUrl . '/api/v1/guest/telegram/webhook?access_token=' . md5(config('v2board.telegram_bot_token', $request->input('telegram_bot_token'))) | ||||
|         ); | ||||
|         return response([ | ||||
|             'data' => true | ||||
|   | ||||
		Reference in New Issue
	
	Block a user