Skip to content

Fix: Use the url of the post for the Meetup rsvp-by-#190

Merged
snarfed merged 1 commit intosnarfed:masterfrom
jamietanna:defect/rsvp-id
Feb 16, 2020
Merged

Fix: Use the url of the post for the Meetup rsvp-by-#190
snarfed merged 1 commit intosnarfed:masterfrom
jamietanna:defect/rsvp-id

Conversation

@jamietanna
Copy link
Collaborator

@jamietanna jamietanna commented Feb 16, 2020

As noticed by snarfed in bridg#906, there may not be an actor, as the
source post may not contain the correct Microformats2 to describe it.

We can instead use the url of the post to de-duplicate it, as it
should be unique, and always present. But if it is not, it'll return an
error to ensure the author fixes their post.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, the catch here is that you can't assume any specific mf2 property will be there, including id. so .get() is really the most important change here, not the property itself, with reasonable fallback. the fallback itself can be more than one property, or just one, as long as it does something reasonable like empty fragment when none of those properties are available.

@snarfed
Copy link
Owner

snarfed commented Feb 16, 2020

(btw feel free to grab me in chat if it's easier to iterate there!)

As noticed by snarfed in bridg#906, there may not be an `actor`, as the
source post may not contain the correct Microformats2 to describe it.

We can instead use the `url` of the post to de-duplicate it, as it
should be unique, and always present. But if it is not, it'll return an
error to ensure the author fixes their post.
@jamietanna jamietanna changed the title Fix: Use the id of the post for the Meetup rsvp-by- Fix: Use the url of the post for the Meetup rsvp-by- Feb 16, 2020
@jamietanna jamietanna requested a review from snarfed February 16, 2020 22:37
@snarfed
Copy link
Owner

snarfed commented Feb 16, 2020

sure! works for me. thanks for your patience with all this back and forth! 😁

@snarfed snarfed merged commit 285a83a into snarfed:master Feb 16, 2020
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

Comments