zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
361 stars 362 forks source link

twitter_bot: Solve retweet issue. #557

Open orientor opened 4 years ago

orientor commented 4 years ago

The twitter bot initially posted all kind of tweets. Change it so that on encountering a retweet either post the original tweet if it hasn't been posted before. Else try to edit the number of retweets in the message of the original tweet.

rht commented 4 years ago

From my reading of the current state of the PR, there is no adding a number of retweets in the body of the message yet (a). What happens is that the message is being edited with the message_id pointing to the latest message. Is feature (a) too unwieldy to implement?

orientor commented 4 years ago

From my reading of the current state of the PR, there is no adding a number of retweets in the body of the message yet (a). What happens is that the message is being edited with the message_id pointing to the latest message. Is feature (a) too unwieldy to implement?

@rht I am storing the twitter id: message id key-value pairs for tweets that have been posted in the config file. So message_id will point to the older message and that will be edited. I didn't understand the "pointing to latest message" part. And if the message is a retweet I am adding the number of retweets to the url variable. I will add the retweets part to the general tweet too.

orientor commented 4 years ago

Screenshot from 2020-03-21 23-57-20 @rht Added number of retweets to all messages.

PIG208 commented 3 years ago

Perhaps it will be feasible to use bot storage to store the key-value pairs.

zulipbot commented 3 years ago

Heads up @orientor, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.