mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-22 21:26:52 +00:00
5d5c0f4f43
* Work around Twidere and Tootdon bug Tootdon and Twidere construct @user@domain handles from mentions in toots based solely on the mention text and account URI's domain without performing any webfinger call or retrieving account info from the Mastodon server. As a result, when a remote user has WEB_DOMAIN ≠ LOCAL_DOMAIN, Twidere and Tootdon will construct the mention as @user@WEB_DOMAIN. Now, this will usually resolve to the correct account (since the recommended configuration is to have WEB_DOMAIN perform webfinger redirections to LOCAL_DOMAIN) when processing mentions, but won't do so when displaying them (as it does not go through the whole account resolution at that time). This change rewrites mentions to the resolved account, so that displaying the mentions will work. * Use lookbehind instead of non-capturing group in MENTION_RE Indeed, substitutions with the previous regexp would erroneously eat any preceding whitespace, which would lead to concatenated mentions in the previous commit. Note that users will “lose” up to one character space per mention for their toots, as that regexp is also used to remove the domain-part of mentioned users for character counting purposes, and it also erroneously removed the preceding character if it was a space. |
||
---|---|---|
.. | ||
concerns | ||
form | ||
web | ||
account.rb | ||
account_domain_block.rb | ||
account_filter.rb | ||
account_moderation_note.rb | ||
application_record.rb | ||
block.rb | ||
context.rb | ||
conversation.rb | ||
conversation_mute.rb | ||
custom_emoji.rb | ||
custom_emoji_filter.rb | ||
domain_block.rb | ||
email_domain_block.rb | ||
export.rb | ||
favourite.rb | ||
feed.rb | ||
follow.rb | ||
follow_request.rb | ||
import.rb | ||
instance.rb | ||
instance_filter.rb | ||
media_attachment.rb | ||
mention.rb | ||
mute.rb | ||
notification.rb | ||
preview_card.rb | ||
remote_follow.rb | ||
remote_profile.rb | ||
report.rb | ||
report_filter.rb | ||
search.rb | ||
session_activation.rb | ||
setting.rb | ||
site_upload.rb | ||
status.rb | ||
status_pin.rb | ||
stream_entry.rb | ||
subscription.rb | ||
tag.rb | ||
user.rb | ||
web.rb |