aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--callback.py16
-rw-r--r--prompt/string.py2
3 files changed, 16 insertions, 14 deletions
diff --git a/README.md b/README.md
index 3b0f016..2c275e4 100644
--- a/README.md
+++ b/README.md
@@ -7,19 +7,15 @@ Foursquare Swarm like Telegram bot to check in at places and post to Fediverse (
7- [x] Telegram native location venue checkin 7- [x] Telegram native location venue checkin
8- [x] Telegram raw GPS location checkin 8- [x] Telegram raw GPS location checkin
9- [x] Attach additional comments and medias (photos, up to 4) with checkins 9- [x] Attach additional comments and medias (photos, up to 4) with checkins
10
11## TODO:
12
13- [x] OAuth2 login 10- [x] OAuth2 login
14
15 - Supported Fediverse software 11 - Supported Fediverse software
16 - [x] Mastodon 12 - [x] Mastodon
17 - [x] Pleroma 13 - [x] Pleroma
18 - [ ] Misskey
19 14
15## TODO:
16
20- [ ] Option to set individual checkin visibility 17- [ ] Option to set individual checkin visibility
21- [ ] Delayed checkins (Scheduled posts on Fediverse) 18- [ ] Delayed checkins (Scheduled posts on Fediverse)
22- [ ] Connect multiple Fediverse accounts 19- [ ] Connect multiple Fediverse accounts
23- [ ] add Telegram payment option to enable raw GPS checkins 20- [ ] add Telegram payment option to enable raw GPS checkins
24- [ ] i18n
25- [ ] Anonymized usage analysis, monitoring (Grafana/Prometheus) 21- [ ] Anonymized usage analysis, monitoring (Grafana/Prometheus)
diff --git a/callback.py b/callback.py
index cb6a8d3..7530afb 100644
--- a/callback.py
+++ b/callback.py
@@ -82,12 +82,16 @@ async def process_media_group(context: CallbackContext):
82 82
83async def callback_generate_fedi_login_url(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: 83async def callback_generate_fedi_login_url(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:
84 home_instance = update.effective_message.text 84 home_instance = update.effective_message.text
85 client_id, client_secret = Mastodon.create_app( 85 try:
86 "Checkin.bot", 86 client_id, client_secret = Mastodon.create_app(
87 scopes=BOT_SCOPE, 87 "Checkin.bot",
88 redirect_uris="{}{}".format(BOT_DOMAIN, FEDI_LOGIN_CALLBACK_URL), 88 scopes=BOT_SCOPE,
89 api_base_url=home_instance, 89 redirect_uris="{}{}".format(BOT_DOMAIN, FEDI_LOGIN_CALLBACK_URL),
90 ) 90 api_base_url=home_instance,
91 )
92 except KeyError as e:
93 await update.message.reply_text(PROMPT_INVALID_INSTANCE)
94 return FEDI_LOGIN
91 95
92 m = Mastodon(client_id=client_id, client_secret=client_secret, api_base_url=home_instance) 96 m = Mastodon(client_id=client_id, client_secret=client_secret, api_base_url=home_instance)
93 97
diff --git a/prompt/string.py b/prompt/string.py
index 2fe13f6..e60085c 100644
--- a/prompt/string.py
+++ b/prompt/string.py
@@ -20,6 +20,8 @@ By using this bot, you agree to the following terms of service:\n\n
20 20
21PROMPT_FEDI_LOGIN_WHERE_IS_INSTANCE = "Where is your home instance in the Fediverse? (e.g. `https://mastodon.social`)" 21PROMPT_FEDI_LOGIN_WHERE_IS_INSTANCE = "Where is your home instance in the Fediverse? (e.g. `https://mastodon.social`)"
22PROMPT_FEDI_LOGIN = "Please login to your Fediverse account by clicking the link below:" 22PROMPT_FEDI_LOGIN = "Please login to your Fediverse account by clicking the link below:"
23PROMPT_INVALID_INSTANCE = "Your home instance (Probably a Misskey or GotoSocial instance?) is not supported. " \
24 "Currently, only Mastodon or Pleroma instances are supported."
23PROMPT_CHOOSE_ACTION = "Use bot keyboard to choose an action" 25PROMPT_CHOOSE_ACTION = "Use bot keyboard to choose an action"
24PROMPT_ADD_COMMENT = "You can continue adding comments, or press skip" 26PROMPT_ADD_COMMENT = "You can continue adding comments, or press skip"
25PROMPT_ADD_MEDIA = "You can continue adding photos, or press skip" 27PROMPT_ADD_MEDIA = "You can continue adding photos, or press skip"
Powered by cgit v1.2.3 (git 2.41.0)