Open wey-gu opened 1 year ago
Now it's something like this:
TBD:
support upload avatar to object storage with URL and pass to slack(seems to be the only way to specify avatar)
Disagree with introducing extra dependencies. I will try a serverless solution that generates the image URLs from the base64 data. Something like:
https://make-image.serverless.app/${base64}
support upload avatar to object storage with URL and pass to slack(seems to be the only way to specify avatar)
Disagree with introducing extra dependencies. I will try a serverless solution that generates the image URLs from the base64 data. Something like:
https://make-image.serverless.app/${base64}
ok, this..., to put image in URL/base64 blew my mind 🤯!!!! It's totally next level🧎🏻...
support upload avatar to object storage with URL and pass to slack(seems to be the only way to specify avatar)
Disagree with introducing extra dependencies. I will try a serverless solution that generates the image URLs from the base64 data. Something like:
https://make-image.serverless.app/${base64}
ok, this..., to put image in URL/base64 blew my mind 🤯!!!! It's totally next level🧎🏻...
Indeed it has been worked out with CF worker(yeah, THANKS TO ChatGPT), try visiting this URL. I am currently stuck by not able to get the contact avatar..
P.S. the API spec is:
https://mkimg.frostming.workers.dev/${base64_url_encoded}.${ext}
Aha, my regular expression was written by ChatGPT, too :P
It worked like a charm! I am not familiar with the price model of CF worker, as it will require CF's edge computing resource to decode and respond with those small images, will this be scaling to anyone? (that is, we can place your single CF-worker-based endpoint by default to expect it will work for long? or do we need users to setup their own avatar base64 ping-pong service same as yours?
I am currently stuck by not able to get the contact avatar..
Reported to wechaty: https://github.com/wechaty/python-wechaty/issues/381
I am currently stuck by not able to get the contact avatar..
Reported to wechaty: wechaty/python-wechaty#381
Oh, I encountered this, too, this is hard as python lib is just a wrapper and the gateway is the major part(hard for me to debug) :(
anyway, I will look into it later, too, I have to prepare for the slides of tomorrow now 🤦🏻♀️.
Indeed, but the error message argument of type 'NoneType' is not iterable
indicates that it may come from Python code. Let's see.
@frostming If the ContactAvatarResponse
, and ContactAvatarRequest
gRPC interface issue cannot be mitigated anyway, we could still leverage your CF worker URL encoded magic to add our customized avatars :)
@frostming If the
ContactAvatarResponse
, andContactAvatarRequest
gRPC interface issue cannot be mitigated anyway, we could still leverage your CF worker URL encoded magic to add our customized avatars :)
I came up with an EVIL approach to fix the issue in a DIRTY way, let me check.
Wow, this sounds neat...😏
A avatar cache should be built to custom msg sender's profile image.
support upload avatar to object storage with URL and pass to slack(seems to be the only way to specify avatar)