Fix: Use the url of the post for the Meetup rsvp-by-#190
Merged
snarfed merged 1 commit intosnarfed:masterfrom Feb 16, 2020
Merged
Fix: Use the url of the post for the Meetup rsvp-by-#190snarfed merged 1 commit intosnarfed:masterfrom
url of the post for the Meetup rsvp-by-#190snarfed merged 1 commit intosnarfed:masterfrom
Conversation
3 tasks
snarfed
reviewed
Feb 16, 2020
granary/meetup.py
Outdated
Owner
There was a problem hiding this comment.
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.
Owner
|
(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.
c9dd108 to
88425f6
Compare
id of the post for the Meetup rsvp-by-url of the post for the Meetup rsvp-by-
Owner
|
sure! works for me. thanks for your patience with all this back and forth! 😁 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As noticed by snarfed in bridg#906, there may not be an
actor, as thesource post may not contain the correct Microformats2 to describe it.
We can instead use the
urlof the post to de-duplicate it, as itshould be unique, and always present. But if it is not, it'll return an
error to ensure the author fixes their post.