Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some Embed "media" fields optional #1

Merged
merged 3 commits into from
Feb 9, 2025

Conversation

unnamedd
Copy link
Contributor

@unnamedd unnamedd commented Feb 9, 2025

Description

Running the project locally, I realized some fields were not being found when decoded by Codable. Then, I checked the Bluesky documentation and noticed some fields were not mandatory. This PR aims to fix them.

Documentation for

  1. Embed Images
  2. Embed Videos

Error

failed to load timeline: 
CompositeSocialService.BlueskyService, 
keyNotFound(
    CodingKeys(stringValue: "aspectRatio", intValue: nil), 
    Swift.DecodingError.Context(
        codingPath: [
            CodingKeys(stringValue: "feed", intValue: nil), 
            _CodingKey(stringValue: "Index 16", intValue: 16), 
            CodingKeys(stringValue: "post", intValue: nil), 
            CodingKeys(stringValue: "record", intValue: nil), 
            CodingKeys(stringValue: "embed", intValue: nil), 
            CodingKeys(stringValue: "images", intValue: nil), 
            _CodingKey(stringValue: "Index 0", intValue: 0)
        ], 
        debugDescription: "No value associated with key CodingKeys(stringValue: \"aspectRatio\", intValue: nil) (\"aspectRatio\").", 
        underlyingError: nil
    )
)

@mattmassicotte mattmassicotte merged commit b705fbf into mattmassicotte:main Feb 9, 2025
6 checks passed
@mattmassicotte
Copy link
Owner

Thank you so much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants