Skip to content

Conversation

@tompscanlan
Copy link
Contributor

@tompscanlan tompscanlan commented Jan 13, 2026

Summary

  • Fix Bluesky event creation failing with "Bad record" errors for events with physical locations
  • ATProto lexicon schema mismatch was causing PDS validation failures

Changes

  • Use $type discriminator instead of type for union types
  • Use latitude/longitude (strings) instead of lat/lon (numbers)
  • Use name field instead of description for geo locations
  • Update BlueskyTypes.ts with properly typed interfaces

Root Cause

The code was sending:

{ type: 'community.lexicon.location.geo', lat: 38.27, lon: -85.64, description: '...' }

But the lexicon requires:

{ $type: 'community.lexicon.location.geo', latitude: '38.27', longitude: '-85.64', name: '...' }

Test plan

  • Added unit tests for geo location schema
  • Added unit tests for URI location schema
  • Added unit tests for hybrid events with both location types
  • Manual test: Create event with physical location and publish to Bluesky
  • Manual test: Verify event appears correctly on Bluesky

Reported by: seth.computer on Bluesky

The Bluesky event creation was failing with "Bad record" errors because
the location objects didn't match the ATProto lexicon schema.

Changes:
- Use $type discriminator instead of type for union types
- Use latitude/longitude (strings) instead of lat/lon (numbers)
- Use name field instead of description for geo locations
- Update BlueskyTypes.ts with proper typed interfaces

Fixes events with physical locations failing to publish to Bluesky.
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