You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-30Lines changed: 14 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,15 @@
2
2
3
3
# Lovebox Telegram Sender
4
4
5
-
The app allows sending messages via Telegram Bot to a single Lovebox instance. Text messages and photos with captions
6
-
are supported. Other message types (e.g. Stickers, Audio, etc.) will lead to a default message.
5
+
The app allows you to send messages to a single instance of Lovebox via Telegram Bot. Text messages and captioned photos are supported. Other message types (e.g. stickers, audio, etc.) will result in a standard message.
7
6
8
7
## Application Setup
9
8
10
-
To set up the app, a few IDs and values need to be retrieved from the Lovebox API. The following curl commands help to find
11
-
the needed data on an existing account. Make sure you have set up your account via the Android or iOS app already.
9
+
To set up the application, you will need to retrieve some IDs and values from the Lovebox API. The following curl commands will help you to on an existing account. Make sure you have already set up your account using the Android or iOS app.
12
10
13
11
### Login with Password
14
12
15
-
Log in with a password to retrieve the authorization token for the following request.
13
+
Log in with a password to retrieve the authorisation token for the following request.
16
14
17
15
```bash
18
16
curl --location --request POST 'https://app-api.loveboxlove.com/v1/auth/loginWithPassword' \
@@ -36,7 +34,7 @@ curl --location --request POST 'https://app-api.loveboxlove.com/v1/auth/loginWit
36
34
37
35
### Me Request with the Authorization Token
38
36
39
-
Use the token above to make the "Me Request" to find the configuration needed details.
37
+
Use the token above to make a 'Me Request' to find the configuration details you need.
40
38
41
39
```bash
42
40
curl --location --request POST 'https://app-api.loveboxlove.com/v1/graphql' \
@@ -137,16 +135,13 @@ curl --location --request POST 'https://app-api.loveboxlove.com/v1/graphql' \
137
135
138
136
### Setting up a Telegram Bot
139
137
140
-
To create a chatbot on Telegram, you need to contact the [@BotFather](https://telegram.me/BotFather), which is a bot
141
-
used to create other bots.
138
+
To create a chatbot on Telegram, you need to contact the [@BotFather](https://telegram.me/BotFather), who is a bot which is used to create other bots.
142
139
143
-
The command you need is `/newbot` which leads to the next steps to create your bot. Follow the instructions and get the
144
-
bot `username`, and `token`.
140
+
The command you need is `/newbot`, which will take you through the next steps to create your bot. Follow the instructions and get the bot `username` and `token`.
145
141
146
142
### Adjusting SpringBoot's application.properties
147
143
148
-
Running the app from the source needs adjustments according to your settings. Adjusting the `application.properties` in
149
-
the sources or passing them as Java options or CLI arguments to the app.
144
+
Running the application from source requires customisation according to your settings. Adjust the `application.properties' in the sources or pass it as Java options or CLI arguments to the application.
Since the app uses fonts, we need to make sure that fonts are part of the docker container. The containers produced
212
-
above throw an exception when using
213
-
them `java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null`
205
+
Since the application uses fonts, we need to make sure that fonts are part of the Docker container. The containers created above will throw an exception if they are `java.lang.NullPointerException`: Cannot load from short array because `sun.awt.FontConfiguration.head` is null.
214
206
215
-
[Andreas Ahlensdorf](https://github.com/aahlenst) describes nicely the font problem in his blog post [Prerequisites for
216
-
Font Support in AdoptOpenJDK](https://blog.adoptopenjdk.net/2021/01/prerequisites-for-font-support-in-adoptopenjdk/).
207
+
[Andreas Ahlensdorf](https://github.com/aahlenst) describes nicely the font problem in his blog post [Prerequisites for Font Support in AdoptOpenJDK](https://blog.adoptopenjdk.net/2021/01/prerequisites-for-font-support-in-adoptopenjdk/).
217
208
218
-
After more research, it seems that the only solution to add fonts to the build pack base image is to create an OCI run
219
-
image by extending the base one. See the `Dockerfile.`base-cnb` file and how a patch with the additional font packages
220
-
might look like.
209
+
After further research, it seems that the only way to add fonts to the build pack base image is to create an OCI run image by extending the base image. See the `Dockerfile.base-cnb` file and what a patch with the additional font packages might look like.
221
210
222
211
Build the `runImage` locally with the following command.
Since we run the pull policy in the `mvn spring-boot:build-image` command with IF_NOT_PRESENT, we need to make sure that
229
-
the newest version of the builder is locally available. Finally, pass to the `spring-boot-maven-plugin` the `runImage`
230
-
to build the docker container containing the fonts.
217
+
Since we are running the pull policy with `IF_NOT_PRESENT` in the `mvn spring-boot:build-image` command, we need to make sure that the latest version of the builder is available locally. Finally, pass the `runImage` to the `spring-boot-maven-plugin` to create the docker container containing the fonts.
Reverse engineering (unpinning certificates) was done with [APKLab](https://github.com/APKLab/APKLab) and the
244
-
[Lovebox APK](https://www.apkmonk.com/app/love.lovebox.loveboxapp/) provided by [apkmonk](https://www.apkmonk.com). Postman
245
-
was used to capture the REST calls from the mobile app. The article [Capturing Http Requests](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/)
246
-
covers everything needed. After a Postman update, [new certs](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#troubleshooting-certificate-issues) need to be installed.
230
+
Reverse engineering (unpinning certificates) was done using [APKLab](https://github.com/APKLab/APKLab) and the [Lovebox APK](https://www.apkmonk.com/app/love.lovebox.loveboxapp/) provided by [apkmonk](https://www.apkmonk.com). Postman was used to capture the REST calls from the mobile application. The article [Capturing Http Requests](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/) covers everything you need to know. After updating Postman, [new certs](https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-http-requests/#troubleshooting-certificate-issues) need to be installed.
0 commit comments