wechaty/puppet-service

Need better compatibility when sending filebox data across grpc

Closed this issue · 4 comments

Currently when we send FileBox data along grpc channel with the old method(messageFile or messageImage), we are using JSON.stringify to convert the filebox data. But we all know that not all types of FileBox supported the JSON.stringify operation, this is a hidden rule that if the hostie server or client want to send the FileBox data, they need to convert it to types are serializable.

I think we can have this logic done inside wechaty-puppet-hostie.

Close this issue since the PR is merged.

huan commented

Should we revert this change from #91 because we have added the stream support to our gRPC service by wechaty/grpc#90 ?

Let's revert this when we decide to use stream to implement messageFile, messageImage etc. Currently the code is still used in those old methods.

huan commented

Yes, you are right.

Let's plan to do it after Dec 31, 2022.