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

group profile picture issue #1257

Closed
weishirongzhen opened this issue Jul 6, 2023 · 2 comments
Closed

group profile picture issue #1257

weishirongzhen opened this issue Jul 6, 2023 · 2 comments
Labels
question Further information is requested

Comments

@weishirongzhen
Copy link

when create group or update a group

groupService.updateGroup(Int64 groupId,
      {String? name,
      String? intro,
      String? announcement,
      int? minScore,
      Int64? typeId,
      DateTime? muteEndDate,
      Int64? successorId,
      bool? quitAfterTransfer})

there is no profilePicture parameter, but in storageService, uploadGroupProfilePicture is provided,
is it group profile picture is missing in api design?

@JamesChenX
Copy link
Member

JamesChenX commented Jul 6, 2023

If you want to manage group profile pictures (or other storage resources) by Turms, the API design is fine because:

  • groupService is mainly used to manage data in the group domain, and storageService is mainly used to manage data for groups, users, and messages in the storage resources domain.
  • If you upload resources by storageService, it's meanless for you to update the profile picture URL of a group to a custom URL because you can either interfere with the profile picture URLs provided by Turms if you decide to use regular profile picture URLs, or you need to call queryGroupProfilePicture to get the URL if you decide to use inregular profile picture URLs for anti-crawler reasons.

But if you want the storage resources by other services (not Turms), it's reasonable to update the profile picture via updateGroup, and I can update the API to add a param like profilePicture for you if you want.

@JamesChenX JamesChenX added the question Further information is requested label Jul 6, 2023
@weishirongzhen
Copy link
Author

thanks for explaination, I can use queryGroupProfilePicture to achieve what I need.

why I hava this issue is influence by userService.updateProfile api :
image
has a param to save profilePicture value

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

No branches or pull requests

2 participants