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

inconsistent handling of upper/lowercase in RSVP processing #81

Closed
sknebel opened this issue Jul 2, 2017 · 2 comments
Closed

inconsistent handling of upper/lowercase in RSVP processing #81

sknebel opened this issue Jul 2, 2017 · 2 comments

Comments

@sknebel
Copy link

sknebel commented Jul 2, 2017

When an RSVP post is processed, the rsvp value as it appears in the post is taken from the source post (via XRay) and used to create the post type
(/helpers/webmention_processor.rb#L297):

    if rsvp = entry['rsvp']
      phrase = "RSVPed #{rsvp} to"
      link.type = "rsvp-#{rsvp}"

When generating the JSON output, this value is passed through as is (/helpers/formats.rb#L41):

      obj[:activity] = {
        :type => link.type,
        :sentence => link.sentence,
        :sentence_html => link.sentence_html
}

When generating the JF2 output, a specific list of cases is matched (/helpers/formats.rb#L136):

when "rsvp-yes"
    relation = :"rsvp"
    jf2[:rsvp] = "yes"

I believe this explains some of what @tantek has been commenting on over in #64. From https://indieweb.org/rsvp it is not immediately clear to me if rsvp values are supposed to be case-sensitive or not? (@tantek again)

@tantek
Copy link
Contributor

tantek commented Jul 3, 2017

Per http://microformats.org/wiki/h-entry which defines p-rsvp, yes, rsvp values must be parsed case-insensitive.

@aaronpk
Copy link
Owner

aaronpk commented Jul 6, 2017

I just pushed a fix to XRay that will convert RSVP values to lowercase, which will help this problem going forward. I also pushed a fix to webmention.io in bfdd4e6 to convert to lowercase.

@aaronpk aaronpk closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants