Merge pull request 'Fixes for use off of tilde.chat/tildeverse' (#2) from kindrobot/tooter:smol-fixes into master

Reviewed-on: #2
This commit is contained in:
Ben Harris 2022-06-14 20:59:43 +00:00
commit 8aa6eadb39
2 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,7 @@ def load(filepath: str):
server = config_yaml["server"]
hostname, port_s = server.split(":", 1)
tls = False
tls = None
if port_s.startswith("+"):
tls = True
@ -42,8 +42,8 @@ def load(filepath: str):
access_token=acct["access_token"],
api_base_url=acct["api_base_url"],
)
if "channel" in acct:
channels[acct["channel"]] = acct["name"]
for channel in acct["channels"]:
channels[channel] = acct["name"]
return Config(
(hostname, port, tls),

View File

@ -36,6 +36,10 @@ def think(self, line):
res = account.toot(f"{status}\n~{author}")
if res:
return "tooted! {}".format(res["url"])
else:
return "tooted failed :("
else:
return "no account :("
else:
return HELP_TEXT