errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.12k stars 614 forks source link

Let send() and send_card() return the message that was created and sent #1487

Closed codablock closed 2 years ago

codablock commented 3 years ago

This allows the backend implementation to attach meta information to the message so that it can be used as parent message in threaded responses.

codablock commented 3 years ago

Some additional information: Right now, you can only respond to messages that the bot received or to own messages when send_message() is used with a self crafted Message object. It's however not possible to do the same with message sent via send()or send_card(). This PR fixes this by returning the internally created Message objects.

For send_card(), this will only work when the underlying backend is sending something that is representable via a Message object. This is automatically true for all backends that use the Markdown templates for cards. Backends like Slack however would need to implement their own handling and creation of Message objects.

codablock commented 3 years ago

Regarding build failures...I have absolutely no idea what's wrong.

sijis commented 3 years ago

Regarding build failures...I have absolutely no idea what's wrong.

Looks like a Github issue. I reran all the tests.

codablock commented 3 years ago

@sijis Do you still plan to merge this? I'm cleaning up my open PRs atm and would like to close this one if there is no interest in it.

sijis commented 3 years ago

I think so. I may have to tweak the PR a bit and what not.

I'd leave it open for now. I'll close it if it's not going to work out.

codablock commented 2 years ago

Hello again. I'm going to close this PR for now to clean up my open PRs. Feel free to take the changes and put it into a new PR.