[GH-ISSUE #181] provide the Telegram bot name in the user configuration dialog #46

Open
opened 2026-02-26 05:32:41 +03:00 by kerem · 0 comments
Owner

Originally created by @j-ed on GitHub (Jan 7, 2019).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/181

Expected behavior

A user of the app should be able to setup e.g. the Telegram gateway without further involvement of the administrator, who has set-up the original gateway. Therefore the name of the already set-up Telegram bot should be displayed in the personal settings of the app configuration. The name should be provided as a hyperlink named @my_nc_bot with the underlying url http://telegram.me/my_nc_bot.
(Most likely this can be handled similar to setup other gateways too)

The required name of the bot can prgrammatically be evaluated by forcing the following api request:

https://api.telegram.org/bot<token>/getMe

{
 "ok":true,
 "result":{
   "id":         123456789,
   "is_bot":     true,
   "first_name": "My own NC bot",
   "username":   "my_nc_bot"       # <<<
  }
}

Current behavior

The name of the configured Telegram bot is now shown in the setup dialog and has be provided by the administrator in any way.

Steps to reproduce

  1. Open Settings -> Personal -> Security and navigate to the Message gateway second-factor auth configuration.
  2. Check the dialog.

Environment

Server Configuration

OS: Linux 3.16.50
Web server: Apache2 2.4.37
Database: MariaDB 10.2.19
PHP version: 7.2.13
Nextcloud version: 15.0.0
Twofactor_gateway app version: 0.11.0

Client Configuration

Browser: Mozilla Firefox 64.0
Operating system: Windows 10

Originally created by @j-ed on GitHub (Jan 7, 2019). Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/181 ## Expected behavior A user of the app should be able to setup e.g. the Telegram gateway without further involvement of the administrator, who has set-up the original gateway. Therefore the name of the already set-up Telegram bot should be displayed in the personal settings of the app configuration. The name should be provided as a hyperlink named `@my_nc_bot` with the underlying url `http://telegram.me/my_nc_bot`. (Most likely this can be handled similar to setup other gateways too) The required name of the bot can prgrammatically be evaluated by forcing the following api request: ``` https://api.telegram.org/bot<token>/getMe { "ok":true, "result":{ "id": 123456789, "is_bot": true, "first_name": "My own NC bot", "username": "my_nc_bot" # <<< } } ``` ## Current behavior The name of the configured Telegram bot is now shown in the setup dialog and has be provided by the administrator in any way. ### Steps to reproduce 1. Open **Settings -> Personal -> Security** and navigate to the `Message gateway second-factor auth` configuration. 2. Check the dialog. ## Environment #### Server Configuration OS: Linux 3.16.50 Web server: Apache2 2.4.37 Database: MariaDB 10.2.19 PHP version: 7.2.13 Nextcloud version: 15.0.0 Twofactor_gateway app version: 0.11.0 #### Client Configuration Browser: Mozilla Firefox 64.0 Operating system: Windows 10
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/twofactor_gateway-nextcloud#46
No description provided.