fix wrong username in share settings (#2148)

This commit is contained in:
Kevin B. authored and GitHub committed 2026-03-18 15:14:01 -05:00
1 parent af08800667
commit eabdfd9aa2
1 file changed
+6 -1
+6 -1
View File
@@ -36,7 +36,12 @@ type ShareResponse struct {
func convertToFrontendShareResponse(r *http.Request, shares []*share.Link, user *users.User) ([]*ShareResponse, error) {
responses := make([]*ShareResponse, 0, len(shares))
for _, s := range shares {
username := user.Username
// Look for the username of the user who created the share
creator, err := store.Users.Get(s.UserID)
username := ""
if err == nil {
username = creator.Username
}
// Get source info to convert path to name for frontend
sourceInfo, ok := config.Server.SourceMap[s.Source]