Skip to content

๐Ÿ’„ style: Add avatar for server database upload to S3, removing SSO dependency for avatar management #7152

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

Merged
merged 9 commits into from
Apr 24, 2025

Conversation

RICHQAQ
Copy link
Contributor

@RICHQAQ RICHQAQ commented Mar 25, 2025

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ‘ท build
  • โšก๏ธ perf
  • ๐Ÿ“ docs
  • ๐Ÿ”จ chore

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

This PR introduces a feature that allows direct upload of avatars to S3 for the server database version. Previously, avatar changes had to be made through the SSO provider, which was a cumbersome process. With the new implementation, users can now upload avatars directly to S3 and store the image URL in the database, removing the SSO dependency for avatar management. Other data will still remain synchronized with the SSO provider.

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

No other functionality was affected. Only the avatar-related mechanism has been modified, making the process more efficient and user-friendly.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 25, 2025
@lobehubbot
Copy link
Member

๐Ÿ‘ @RICHQAQ

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

@dosubot dosubot bot added the ๐ŸŒ  Feature Request New feature or request | ็‰นๆ€งไธŽๅปบ่ฎฎ label Mar 25, 2025
Copy link

vercel bot commented Mar 25, 2025

@RICHQAQ is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

@RICHQAQ
Copy link
Contributor Author

RICHQAQ commented Mar 25, 2025

I believe that some information, such as avatars, doesnโ€™t need to be tightly synced with the SSO provider. Just like many apps (e.g., WeChat, Google login), the username and avatar can be modified directly by the user without affecting the authentication service. This separation allows for a more flexible and user-friendly experience.

Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! There is some part need to be improved~

@RICHQAQ RICHQAQ requested a review from arvinxx March 30, 2025 06:35
@arvinxx arvinxx changed the title Add avatar of server database version upload to S3, removing SSO dependency for avatar management โœจ feat: Add avatar of server database version upload to S3, removing SSO dependency for avatar management Apr 16, 2025
@arvinxx arvinxx changed the title โœจ feat: Add avatar of server database version upload to S3, removing SSO dependency for avatar management โœจ feat: Add avatar for server database upload to S3, removing SSO dependency for avatar management Apr 16, 2025
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 95.74%. Comparing base (e130855) to head (79a701a).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7152      +/-   ##
==========================================
+ Coverage   89.26%   95.74%   +6.48%     
==========================================
  Files         790       14     -776     
  Lines       57272     2492   -54780     
  Branches     5291      238    -5053     
==========================================
- Hits        51122     2386   -48736     
+ Misses       6150      106    -6044     
Flag Coverage ฮ”
app ?
server 95.74% <รธ> (รธ)

Flags with carried forward coverage won't be shown. Click here to find out more.

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„๏ธ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • ๐Ÿ“ฆ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
lobe-chat-database โœ… Ready (Inspect) Visit Preview Apr 24, 2025 9:28am
lobe-chat-preview โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Apr 24, 2025 9:28am

@arvinxx
Copy link
Contributor

arvinxx commented Apr 16, 2025

I'm working on the desktop version,and it turns out to be a must to sync user avatar from the api. So I'll take it ASAP.

@arvinxx
Copy link
Contributor

arvinxx commented Apr 18, 2025

Please rebase the main

Copy link
Contributor Author

@RICHQAQ RICHQAQ left a comment

Choose a reason for hiding this comment

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

Please rebase the main

Is this implementation acceptable, or would you like me to make any changes?

@arvinxx arvinxx changed the title โœจ feat: Add avatar for server database upload to S3, removing SSO dependency for avatar management ๐Ÿ’„ style: Add avatar for server database upload to S3, removing SSO dependency for avatar management Apr 24, 2025
Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks for your contribution!

@arvinxx arvinxx merged commit f15200d into lobehub:main Apr 24, 2025
17 of 19 checks passed
@lobehubbot
Copy link
Member

โค๏ธ Great PR @RICHQAQ โค๏ธ

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

github-actions bot pushed a commit that referenced this pull request Apr 24, 2025
### [Version&nbsp;1.82.5](v1.82.4...v1.82.5)
<sup>Released on **2025-04-24**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Countries-and-timezones return invalid timezone.

#### ๐Ÿ’„ Styles

- **misc**: Add avatar for server database upload to S3, removing SSO dependency for avatar management.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Countries-and-timezones return invalid timezone, closes [#7539](#7539) [#7518](#7518) [#7542](#7542) ([bdb44a8](bdb44a8))

#### Styles

* **misc**: Add avatar for server database upload to S3, removing SSO dependency for avatar management, closes [#7152](#7152) ([f15200d](f15200d))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

๐ŸŽ‰ This PR is included in version 1.82.5 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐ŸŒ  Feature Request New feature or request | ็‰นๆ€งไธŽๅปบ่ฎฎ released size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants