nyastodon/app
ThibG d19ed18388 Get handle from atom feed's author/email field instead of guessing from URL (#1344)
The goal of this change is to enhance Mastodon's handling of remote domains
for which the APIs reside on a different host (see issue #1032).

Indeed, when a remote user unknown to Mastodon is mentionned, only its profile
URL (e.g. https://social.example.org/users/User) is known, and Mastodon has to
build a @username@domain handle for it. To do so, Mastodon fetches the user's
atom feed (e.g., https://social.example.org/users/User.atom) and uses its
content to get the username part of the handle, and the URL's host part to
build the domain (e.g., @User@social.example.org). This handle is then used
for a Webfinger request.

In the case where example.org serves the Webfinger info for @User@example.org
and all feeds and APIs are hosted at social.example.org, Mastodon will still
build @User@social.example.org and fail at resolving the account's details
through Webfinger.

This patch changes this behaviour by using the author's email address from
the atom feed to build the handle. In Mastodon-generated atom feeds, the
email address is always the handle it expects for federation.
2017-04-09 18:43:48 +02:00
..
assets Update fr.jsx (#1329) 2017-04-09 14:58:08 +02:00
controllers Use HTTP Accept-Language to detect locale (#1166) 2017-04-09 18:40:24 +02:00
helpers Helper cleanup (#1348) 2017-04-09 17:11:37 +02:00
lib DRY up reblog vs original status check 2017-04-07 14:18:30 -04:00
mailers Add digest e-mails 2017-03-04 00:00:48 +01:00
models Search cleanup (#1333) 2017-04-09 14:45:01 +02:00
presenters Clean up about page (#1282) 2017-04-09 14:47:25 +02:00
services Get handle from atom feed's author/email field instead of guessing from URL (#1344) 2017-04-09 18:43:48 +02:00
views French translation update (#1271) 2017-04-09 14:55:58 +02:00
workers Fix #1141, fix #1126 - Avatar/profile info fetching (#1215) 2017-04-08 13:26:03 +02:00