(obj map[string]any)
| 366 | if err != nil { |
| 367 | updated = published |
| 368 | } |
| 369 | return published, updated, nil |
| 370 | } |
| 371 | |
| 372 | func inReplyToID(inReplyTo *models.Status) *snowflake.ID { |
| 373 | if inReplyTo != nil { |
| 374 | return &inReplyTo.ID |
| 375 | } |
| 376 | return nil |
| 377 | } |
| 378 | |
| 379 | func inReplyToActorID(inReplyTo *models.Status) *snowflake.ID { |
| 380 | if inReplyTo != nil { |
| 381 | return &inReplyTo.ActorID |
| 382 | } |
| 383 | return nil |
| 384 | } |
| 385 | |
| 386 | func objToStatusAttachment(obj map[string]any) *models.StatusAttachment { |
| 387 | return &models.StatusAttachment{ |
| 388 | Attachment: models.Attachment{ |
| 389 | ID: snowflake.Now(), |
| 390 | MediaType: stringFromAny(obj["mediaType"]), |
| 391 | URL: stringFromAny(obj["url"]), |
| 392 | Name: stringFromAny(obj["name"]), |
| 393 | Width: intFromAny(obj["width"]), |
| 394 | Height: intFromAny(obj["height"]), |
| 395 | Blurhash: stringFromAny(obj["blurhash"]), |
| 396 | FocalPoint: focalPoint(obj), |
nothing calls this directly
no test coverage detected