feat(avatar): Avatar support for html rendering

This commit is contained in:
Symb0x76
2025-09-23 10:44:00 +08:00
parent 29e406b2f1
commit ef86e77a92
14 changed files with 457 additions and 31 deletions
+9
View File
@@ -0,0 +1,9 @@
package model
// Avatar represents a user's avatar, either as a remote URL (v3) or inline bytes (v4)
type Avatar struct {
Username string `json:"username"`
URL string `json:"url,omitempty"`
ContentType string `json:"-"`
Data []byte `json:"-"`
}
+2
View File
@@ -6,6 +6,8 @@ type Contact struct {
Remark string `json:"remark"`
NickName string `json:"nickName"`
IsFriend bool `json:"isFriend"`
// AvatarURL is a service-composed URL to fetch avatar image
AvatarURL string `json:"avatarUrl,omitempty"`
}
// CREATE TABLE Contact(