-
-
Notifications
You must be signed in to change notification settings - Fork 392
Clean and modify interface of functions in zulip_bots/lib.py to work for Embedded bots. #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Names are not guaranteed to be unique, user ids should be used when comparing if the sender and receiver are the same.
This is done so that Embedded bot system can also make use of this function directly, as only id is needed in this function. Also, there would be ambiguity as what type of BotHandler is passed in the arguments: EmbeddedBotHandler or ExternalBotHandler.
This is done so that Embedded bot system can also make use of this function directly, as only client name is needed in this function, and the type of client need not be ExternalBotHandler. Also, there would be ambiguity as what type of BotHandler is passed in the arguments: EmbeddedBotHandler or ExternalBotHandler.
Extract code and make an independent function to check and remove at-mention string (if the message is not a private message). This is done so that Embedded bots can also use this piece of code.
616c467
to
3befbc3
Compare
This function needs to be called by bots using additional specific configurations stored either in a file (in the case of External bots) or in the database (in case of Embedded bots). Extracting this piece of code to make it usable independently.
Heads up @abhijeetkaur, 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 |
I merged the first bit of this, after some changes to variable names etc. Want to spend some more time thinking about the rest. |
@abhijeetkaur This looks great, but you need to fix a merge conflict! Thanks! |
Heads up @abhijeetkaur, 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 |
We need to merge this PR after tweaking it a little bit. As embedded bots will not work in private groups otherwise. We also need to note that the change needs to be reflected in the server. The function Yet it's stale, I think we can reuse some of the code here. |
No description provided.