- User use command /login from their notification bot
- Bot will send authentication link to User, the link will be used to authenticate user SSO account using akun.cs.ui.ac.id (link example: https://<yourServerUrl>/loginsso)
- User will login to akun.cs.ui.ac.id using their SSO account
- If User account registered to akun.cs.ui.ac.id, User could fill their phone number that associated with his/her telegram account
- User phone number saved in database, the notification settings still deactivted
- If User account not registered (maybe wrong username or password) they could retry to login again
### 2. Activate and Deactivate Notification (From Telegram Bot APP)
Activate Account Notification:
- User use command /activateNotif in telegram bot chat room
- Chat bot will ask User if they want to share their contact to bot
- User share their contact, then server will save the chatId from contact to database associated with phone number that has been registered through authentification process
- User will recieve notification that being push by Information System in Fasilkom UI
Deactivate Account Notification:
- User use command /deactivateNotif in telegram bot chat room
- Chat bot will automatically delete chatId in database, so User won't recieve any notification
### 3. Push Notification Custom Message
If any information system want to send custom push notification to specific User, they could this API:
- URL: https://\<your server main url\>/sendNotification/custom
After that user will recieve notification based on custom message that being send
### 4. Push Notification for surat.cs.ui.ac.id Using Template
If surat.cs.ui.ac.id want to send notification to user that request to make Letter, they could use this API:
- URL: https://\<your server main url\>/sendNotification/sisurat
- Method: POST
- Request Body:
{
"username": <User SSO username>,
"type": <Enum type of letter creation status, see definition below>,
"judulSurat": <The letter tittle>
}
- Letter creation status enum:
- 0 : "Diajukan"
- 1 : "Ditolak"
- 2 : "PersetujuanDosen"
- 3 : "Proses"
- 4 : "Selesai"
After that user will recieve notification based on their letter creation status, using template that has been configured. See files ./telebot/sisuratNotif.py to see messages template