Send attachments improvements#1209
Conversation
MarkKoz
left a comment
There was a problem hiding this comment.
You're correct that antispam sends the attachments before deleting the messages. However, setting use_cached to false decreases the likelihood of successfully sending deleted attachments for all callers of the function. This is because a message can be deleted by the author while the bot is trying to process/handle the message. That being said, I don't know if it's really worth potentially making two requests per attachment via the idea to try the proxy and then the normal if the proxy fails.
kwzrd
left a comment
There was a problem hiding this comment.
Looks alright. I think it's a little risky to forward **kwargs because of the destination union type, but I guess it would be the caller's responsibility to make sure they don't pass an invalid kwarg.
Closes #1137 and closes #1139
I think this also closes #909
I just changed the default for
use_cachedto False, and didn't change it to set to True manually anywhere as I couldn't find anywhere that it was needed, antispam was the main one I checked but doesn't seem to try to fetch deleted messages from what I can see. Would be nice if somebody could confirm this