Skip to content

Commit

Permalink
Fix bug where null message text throws error + update readme (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
shayaantx authored Jan 9, 2022
1 parent c6e467b commit 62e851a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 117 deletions.
114 changes: 0 additions & 114 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 0 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ botdarr:
| DISCORD_CHANNELS | The actual discord channel(s) the bot lives in | yes - if you use discord |
| TELEGRAM_TOKEN | The telegram bot token (don't share) | yes - if you use telegram |
| TELEGRAM_PRIVATE_CHANNELS | Your actual telegram channels your bot can respond in. This should be a list containing the name and id of the channel, i.e., CHANNEL_NAME:CHANNEL_ID to get the channel id, right click any post in private channel and copy post link you should see something like this, https://t.me/c/1408146664/63 the id is between c/<id>/<postId> example: plex-channel1:id1,plex-channel2:id2 | yes - if you use telegram |
| TELEGRAM_PRIVATE_GROUPS | Your actual telegram groups your bot can respond in. This should be a list containing the name and id of the group, i.e., GROUP_NAME:GROUP_ID to get the channel id, right click any post in private group and copy post link (you need to enable message history for this) you should see something like this, https://t.me/c/1408146664/63 the id is between c/<id>/<postId> example: plex-group1:id1,plex-group2:id2 | yes - if you use telegram |
| SLACK_BOT_TOKEN | The slack bot oauth authentication token (don't share) | yes - if you use slack |
| SLACK_USER_TOKEN | The slack user oauth authentication token | yes - if you use slack |
| SLACK_CHANNELS | The actual slack channel(s) you want to post slack messages to | yes - if you use slack |
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/botdarr/clients/ChatClientType.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void init() throws Exception {
try {
for (Update update : list) {
com.pengrad.telegrambot.model.Message message = isUsingChannels() ? update.channelPost() : update.message();
if (message != null) {
if (message != null && !Strings.isEmpty(message.text())) {
String text = message.text();
//TODO: the telegram api doesn't seem return "from" field in channel posts for some reason
//for now we leave the author as "telegram" till a better solution arises
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.13
5.1.14

0 comments on commit 62e851a

Please sign in to comment.