Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users Mapping Optimization #83

Merged
merged 8 commits into from
Jul 22, 2021
Merged

Conversation

lprintf
Copy link
Contributor

@lprintf lprintf commented Jul 20, 2021

Try to optimize information show about wechat user, including the case which #66 descripts.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 20, 2021

It's not easy to debug the profile show problems, and there only leave the last one guesses waitting to verificate. 😂

@lprintf
Copy link
Contributor Author

lprintf commented Jul 21, 2021

It's not easy to debug the profile show problems, and there only leave the last one guesses waitting to verificate.

Yes, It is a intent to set profile, can not do in inital bot user.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 21, 2021

@lprintf
Copy link
Contributor Author

lprintf commented Jul 21, 2021

We should deal with the avator like #82 . And there is no defficulty.

Comment on lines +268 to +274
const avatarFile = await wechatyUser.avatar()
const avatarBuffer = await avatarFile.toBuffer()
const avatarUrl = await this.appserviceManager.uploadContent(
avatarBuffer,
matrixUserId,
{ type: avatarFile.mimeType },
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also use the wechat image source url directly.

@lprintf
Copy link
Contributor Author

lprintf commented Jul 21, 2021

No other optimization ideas for the time being.

Copy link
Member

@huan huan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Your code looks good, thank you very much for implementing the avatar display for Wechaty users!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants