Releases: slaninas/tostr
Less Sophisticated Release Title
created_at
field is not filed with the tweet's timestamp. Instead a new timestamp is created when the event is created (this is actually how it originally worked). Tweet's timestamp is now available in the "tweet_timestamp" tag.
I realized it's not a good idea to use tweet's timestamp because every Twitter account has its own worker and there are pauses of refresh_interval_secs
seconds between tweet fetches. So if the tweets' timestamps were used for created_at
field it would mean the bot can send event with created_at: T
and later another (from another account worker) with create_at: T - x
meaning the latter event would be inserted into the existing timeline so it would be easy to miss it.
Very Sophisticated Release Title
- Bot can be connected to multiple relays at once
- Tor support for relays and Twitter connections
- Main bot posts statuses about connection to Twitter (lost/reconnected)
- Profile pics from Twitter
- Final URL is shown instead of t.co links (if redirects follow fails dues to missing certificate along the way then orig t.co is used)
- Replies to tweets are ignored (spam prevention)
- nostr's created_at field now uses tweet's timestamp (was just a time when the tweet was grabbed by the bot)
- Fix crashes of random command when there were no accounts followed
- Code reorganization
Interactive bot
Twitter accounts are no longer set by config file when the bot starts.
Instead it listens to a given relay and when someone replies to its message with 'add twitter_account' command,
it spawns a new worker and replies with a newly generated pubkey the worker will use to post tweets.
There is also a 'random' command which returns pubkey for a random Twitter user the bot is already following.
Lots of improvements such as
- The only dependency outside Rust is the twint now
- No more nostril process spawning for each new event
- No more websocat process spawning for each new send
- If the connection to the websocket is lost, the bot tries to reconnect
- 'docker run' now really just runs instead of building whole tostr and then running
- Bot is setting its profile info
Bug fix
First version, should somehow work
v0.1 Move struct declarations