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

enhance/fix(AP/frontend): 最近追加されたMFMのもろもろを修正 #12420

Merged
merged 9 commits into from
Nov 23, 2023

Conversation

kakkokari-gtyih
Copy link
Contributor

@kakkokari-gtyih kakkokari-gtyih commented Nov 23, 2023

What

  • ActivityPub向けの出力でルビが素のHTMLで出力されるようになります
  • MFM $[unixtime ] で不正な値が入った場合、文字列にフォールバックするようになります(AP)
  • MFM $[unixtime ] で不正な値が入った場合、「日時の解析に失敗」と表示されます(Misskey Web)

image

改良後のActivity JSON
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
      "sensitive": "as:sensitive",
      "Hashtag": "as:Hashtag",
      "quoteUrl": "as:quoteUrl",
      "toot": "http://joinmastodon.org/ns#",
      "Emoji": "toot:Emoji",
      "featured": "toot:featured",
      "discoverable": "toot:discoverable",
      "schema": "http://schema.org#",
      "PropertyValue": "schema:PropertyValue",
      "value": "schema:value",
      "misskey": "https://misskey-hub.net/ns#",
      "_misskey_content": "misskey:_misskey_content",
      "_misskey_quote": "misskey:_misskey_quote",
      "_misskey_reaction": "misskey:_misskey_reaction",
      "_misskey_votes": "misskey:_misskey_votes",
      "_misskey_summary": "misskey:_misskey_summary",
      "isCat": "misskey:isCat",
      "vcard": "http://www.w3.org/2006/vcard/ns#"
    }
  ],
  "id": "http://localhost:3000/notes/9mekeodw01",
  "type": "Note",
  "attributedTo": "http://localhost:3000/users/9d5v2772ig",
  "content": "<p><ruby><i><b><span>劉備</span></b></i><rp>(</rp><rt>りゅうび</rt><rp>)</rp></ruby></p>",
  "_misskey_content": "$[ruby $[fg.color=f00 **劉備**] りゅうび]",
  "source": {
    "content": "$[ruby $[fg.color=f00 **劉備**] りゅうび]",
    "mediaType": "text/x.misskeymarkdown"
  },
  "published": "2023-11-23T09:38:11.828Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "cc": [
    "http://localhost:3000/users/9d5v2772ig/followers"
  ],
  "inReplyTo": null,
  "attachment": [],
  "sensitive": false,
  "tag": []
}

Why

Fix #12382
Fix #12378

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@kakkokari-gtyih kakkokari-gtyih added the 🌌Federation The Federation/ActivityPub feature label Nov 23, 2023
@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Nov 23, 2023
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (4a2a448) 78.74% compared to head (cd7a05d) 78.72%.

Files Patch % Lines
packages/frontend/src/components/global/MkTime.vue 62.50% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12420      +/-   ##
===========================================
- Coverage    78.74%   78.72%   -0.02%     
===========================================
  Files          177      177              
  Lines        23451    23464      +13     
  Branches       495      496       +1     
===========================================
+ Hits         18466    18473       +7     
- Misses        4985     4991       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 23, 2023

このPRによるapi.jsonの差分

差分はこちら

Get diff files from Workflow Page

@kakkokari-gtyih kakkokari-gtyih changed the title enhance(backend/AP): $[ruby ] が平文HTMLで出力されるように enhance/fix(AP/frontend): 最近追加されたMFMのもろもろを修正 Nov 23, 2023
@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Nov 23, 2023
@kakkokari-gtyih
Copy link
Contributor Author

現状$[unixtime ]に変な値突っ込んだら、そのノートが流れてきたクライアントが軒並みフリーズするようになってた(こわいはなし)

@syuilo syuilo merged commit ed6f866 into misskey-dev:develop Nov 23, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Nov 23, 2023

🙏🙏🙏

@kakkokari-gtyih kakkokari-gtyih deleted the enh-12382 branch November 23, 2023 12:55
u1-liquid pushed a commit to u1-liquid/misskey that referenced this pull request Nov 25, 2023
* (enhance) MFM rubyが連合されるように

* Update Changelog

* Update Changelog

* (fix) unixtimeのフォールバック (AP)

* (fix) unixtimeのフォールバック (frontend)

* Update Changelog
anatawa12 pushed a commit to anatawa12/misskey that referenced this pull request Nov 26, 2023
* (enhance) MFM rubyが連合されるように

* Update Changelog

* Update Changelog

* (fix) unixtimeのフォールバック (AP)

* (fix) unixtimeのフォールバック (frontend)

* Update Changelog
camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
* (enhance) MFM rubyが連合されるように

* Update Changelog

* Update Changelog

* (fix) unixtimeのフォールバック (AP)

* (fix) unixtimeのフォールバック (frontend)

* Update Changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌌Federation The Federation/ActivityPub feature packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR
Projects
None yet
2 participants