-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FacebookBridge] Handle mobile links and standardise host validation #1789
Conversation
Hi, @joshcoales !
I will add this label after accepting 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.
Nice idea about unifying checks.
Instead of using if
statement for checking validity of host, I suggest validateHost
to raise client error (returnClientError
) instead of returning true/false. Also you would not need to duplicate error message.
Also make sure that
does not return errors. |
Sounds good, I've pushed that now!
Ah, whoops, had spaces instead of tabs. |
Here's a commit with the whole FacebookBridge class neatened up, which shushes all the phpcs warnings. Shall I put that on this branch too? Also, would it be helpful if I made another PR, adding type hints and neatening stuff up more generally? EDIT: Helps if I actually link it: |
@joshcoales, please rebase your PR in order for Travis CI to check your commit.
Checked that commit. In general, all changes must be discussed individually, if not covered by linting. It can take a lot of time. So I suggest not to discuss it at all. |
That makes sense to me. Any other changes needed on this PR? |
As I mentioned above - rebase your PR |
…etween user and group links.
…cating exception raising
8dd7ec7
to
84bfdb9
Compare
Sorry about that, I missed that somehow. I have rebased this branch now. EDIT: Looks like Travis has jammed though? Spawned two builds, but both link to the same place, which has passed. |
Thanks for contribution. You can check other facebook issues to fix. At the moment, facebook groups don't seem to be working. |
Sounds like a plan! I've got a few other things here I've got an eye on too. (A few fixes I would like to make, but also some PRs, like #1758 ) How would you feel about automated external integration tests? |
If some bridge does stops working, its user will open issue here. So, there is no need for those integration tests |
It seems like switching to that mechanism would be the best way to make things work. Would that deprecate FB2Bridge? |
Actually I don't know why FB2 bridge exists as separate bridge for Facebook. @teromene, hi! Do you have and idea why it was made like this? |
The existence of FB2 is purely done because of historical reasons: |
A simple little change to standardise host validation between user and group links, and allow mobile links, which should close #1782 and avoid issues like that again in the future.
I'm not sure whether this is enough to justify a
hacktoberfest-accepted
label, but I would be quite happy if it did. I've had my eye on some things here for hacktoberfest this year, but more than I expected are blocked by #1170