add dynamic profile update, connection helper, file download metadata
- replace UserSetColor/UserSetPronouns with single UserUpdateProfile that dynamically builds one UPDATE query from UserProfileUpdateList - add getConnectionWithResponseOnFail helper to deduplicate connection ID parsing and validation across handlers - rename file.go to attachmentFile.go and update handler names - GetDownloadUrlAndMetadata now fetches object metadata via StatObject and returns it alongside the presigned URL - file download endpoint returns JSON with url and originalName - add description field to user and DB schema - remove unused ConnectionState variants (GroupFellow, GroupFriend) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,9 @@ type User struct {
|
||||
Mu sync.RWMutex
|
||||
Name string
|
||||
Pronouns string
|
||||
Description string
|
||||
Avatar string
|
||||
ProfileBg string
|
||||
PasswordHash string
|
||||
CreatedAt time.Time
|
||||
WsConn *websocket.Conn
|
||||
@@ -36,6 +39,12 @@ type User struct {
|
||||
Color *Rgba
|
||||
}
|
||||
|
||||
type UserProfileUpdateList struct {
|
||||
Pronouns bool
|
||||
Description bool
|
||||
Color bool
|
||||
}
|
||||
|
||||
type Connection struct {
|
||||
Mu sync.RWMutex `json:"-"`
|
||||
Id uuid.UUID `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user