backend for xcvr appview

add smv types

Changed files
+23 -1
server
internal
types
+23 -1
server/internal/types/lexicons.go
··· 228 228 } 229 229 230 230 type MediaView struct { 231 - Type string `json:"$type,const=org.xcvr.lrc.defs#messageView"` 231 + Type string `json:"$type,const=org.xcvr.lrc.defs#mediaView"` 232 232 URI string `json:"uri"` 233 233 Author ProfileView `json:"author"` 234 234 Image *ImageView `json:"imageView,omitempty"` ··· 262 262 Alias: (*Alias)(&m), 263 263 }) 264 264 } 265 + 266 + type SignedMediaView struct { 267 + Type string `json:"$type,const=org.xcvr.lrc.defs#signedMediaView"` 268 + URI string `json:"uri"` 269 + Author ProfileView `json:"author"` 270 + Image *ImageView `json:"imageView,omitempty"` 271 + Nick *string `json:"nick,omitempty"` 272 + Color *uint32 `json:"color,omitempty"` 273 + Signet SignetView `json:"signet"` 274 + PostedAt time.Time `json:"postedAt"` 275 + } 276 + 277 + func (m SignedMediaView) MarshalJSON() ([]byte, error) { 278 + type Alias SignedMediaView 279 + return json.Marshal(&struct { 280 + Type string `json:"$type"` 281 + *Alias 282 + }{ 283 + Type: "org.xcvr.lrc.defs#signedMediaView", 284 + Alias: (*Alias)(&m), 285 + }) 286 + }