open for all users

This commit is contained in:
Falko Zurell 2025-02-18 15:53:04 +01:00
parent 1c09b57c70
commit 5db4e6bad3
2 changed files with 10 additions and 6 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

16
mbot.py
View file

@ -53,18 +53,22 @@ def main():
content = mention['status']['content']
username = mention['status']['account']['username']
user_url = mention['status']['account']['url']
prompt = html2text.html2text(content)
if username != "maxheadroom":
continue
print(f"From {username} given {content} \n {mention['id']}")
#if username != "maxheadroom":
# continue
response = send_to_ollama(prompt, config)
if not response or config['mastodon']['bot_username'] in response:
if not response:
continue
masto.status_post(
status=f"@{username} {response}",
in_reply_to_id=mention['status']['id'],
masto.status_reply(
to_status=mention['status'],
status=f"{username} {response}",
untag = True,
visibility=config['mastodon']['default_visibility']
)