Open hcfw007 opened 1 year ago
@huan ping
It’s not very clear for me what the channel is exactly.
Could you please explain your code with some snapshots on the chat UI?
thank you very much.
Sure. Channel is a special 'app like' message in wecom/wechat eco. In a wechat client, it look like this. This is a regular channel.
This is a live channel.
@huan ping
你们用中文吧 这是微信的视频号吧,这个类型用频道渠道 channel 来定义,有点不合适
不合适有什么理由吗?
@huan Maybe it's easier to understand with PRs: wechaty-puppet: https://github.com/wechaty/puppet/pull/212 wechaty-grpc: https://github.com/wechaty/grpc/pull/190 wechaty-puppet-service: https://github.com/wechaty/puppet-service/pull/228 wechaty: https://github.com/wechaty/wechaty/pull/2525
After a quick review of those PRs for the Channel message, I roughly feel that the Channel message should be possible to be implemented with the Post
data structure?
It would be great if we could reuse the Post
with the Channel
messages.
Do you think it's possible? If not, what are the blockers?
If we pass the description, title, thumbnail and url as sayables and make it a Post, it seems to be OK.
However just like MiniProgram, there are fields that won't be dispalyed (or said as a sayable). Like appid and username (off MiniProgram), it won't be displayed and cannot be categorized into any sayable type.
I'm still wondering if there's a way to generalize the Channel
type so we can reuse some universal data types, like the Sayable
.
For example, how will we categorize the following data types?
Can we consider those data types when we add the new Channel
type?
CC @windmemory @su-chang
Guys, Any comments?
It's hard to dig into it without knowing how these IMs implement such data structures. The key problem for Post is all the data in a Post are sayables, while wecom data is containings unsayable fields e.g. extra
, feedType
.
Hi, @hcfw007! I'm Dosu, and I'm here to help the wechaty team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, you opened this issue requesting support for Channel Messages in Wechaty. You provided a proposed data structure and examples of how to use Channel Messages. In the comments, you explained what a channel is and even provided screenshots. There was also a discussion about how to implement the Channel type and whether it can be generalized to other data types like TikTok videos and Instagram posts.
However, it seems that this issue is still unresolved. Before we proceed, we would like to confirm if this issue is still relevant to the latest version of the wechaty repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your understanding and contribution to the wechaty community! Let us know if you have any further questions or concerns.
Hi, @hcfw007
I'm helping the Wechaty team manage their backlog and am marking this issue as stale. The issue you opened proposes adding support for Channel Messages in Wechaty, including defining the data structure for ChannelPayload and demonstrating how to receive, send, and post a channel message using Wechaty. There was a discussion about how to implement the Channel type and whether it can be generalized to other data types like TikTok videos and Instagram posts.
Could you please confirm if this issue is still relevant to the latest version of the Wechaty repository? If it is, please let the Wechaty team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!
Intro
Channel is kinda like a special link url. In Wechat/Wecom eco, it specifies a video or a live show in a channel account. I'm not sure if other IM has similar messages.
Data Structure
In Wechat/Wecom eco, Channel is defined like this:
The keys and data types are not very clear in semantic. So in wechaty puppet we should put it this way.
Use in Wechaty
We use it just like miniProgram or urlLink. e.g.: receiving a channel message
e.g.: sending a a channel message
e.g.: posting a channel moment