-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update dupe check #386
Update dupe check #386
Conversation
Makes me wonder if we shouldn't migrate to source_url to match activitypub. |
( isset( $commentdata['comment_type'] ) && 'webmention' === $commentdata['comment_type'] ) || | ||
( isset( $commentdata['comment_meta'] ) && ! empty( $commentdata['comment_meta']['semantic_linkbacks_type'] ) ) | ||
) { | ||
if ( ! empty( $commentdata['comment_meta']['protocol'] ) && 'webmention' === $commentdata['comment_meta']['protocol'] ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a check that is only supposed to be triggered on a Webmention, but no issue with an existence check
I don't think we do. Don't we have to decode them? |
for reference: #359 (comment) |
@dshanske not decode, but encode! Because they are saved encoded didn't they? |
This is how I confuse myself |
😊 I think we should add some tests, to see what is correct! |
I would love to use this, to add some tests. Maybe @snarfed has some "special" URLs for us ;) |
@pfefferle Do you want to merge this and do the urlencode testing as a separate PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This updates the dupe check parameters to search for dupes by matching on webmention_source_url, url, _crossposting_link or source_url in one query instead of multiple queries.
webmention_source url = the original source url
url = the canonical url in the event of something like a Bridgy post
_crossposting_link for Salmon
source_url for ActivityPub