unarist
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 鯖缶向けActivityPub情報 @1.6.0 以下の内容は2017年9月に Mastodon v1.6.0 周辺に向けて書いた情報です。めっちゃ古いよ。 ---- 疑問点やバグ報告等あれば、お近くのコントリビューターまで。英語が書ける人は [GitHub](https://github.com/tootsuite/mastodon/issues)(バグ報告とかの技術的な話)や [Discourse](https://discourse.joinmastodon.org/t/mastodon-v1-6-0rc1/544)(その他の質問・意見)に直接どうぞ。 書いた人は @unarist@mstdn.maud.io です。 なお1.5へのダウングレードについては、する側もされる側もあまり考慮されておらず、投稿が重複して届く、配信されない、削除等が反映されない、といったことが考えられるので、極力避けることをおすすめします。 ## OStatusとの違い * OStatusではWebSubというプロトコルで「購読」したインスタンスに対して配信を行っていましたが、ActivityPubに購読の概念はなく、フォロワー全員に配信されます。 * Mastodonはアカウントごとにどのプロトコルで配信するかという情報を持っており、それがActivityPubになっているフォロワーに対してActivityPubでの配信が行なわれます。 * ActivityPubでの配信とWebSubでの配信は独立しているため、ActivityPubで配信を受けているアカウントがWebSubでも購読していた場合、二重に配信されることになります。この場合、重複する配信は受信側で無視されます。 * とはいえ無駄なので、ActivityPubでの配信を確認すると自動的に解除します。 * ~~OStatusとActivityPubでは投稿を識別するIDやURLが異なります。~~ rc2以降はOStatus側がActivityPub側に合わせる形になりました。タイムスタンプのリンク先は(1.6同士であれば)常に https://example.com/@foo/5678 といった形になります。 * OStatusで受信した投稿も、ActivityPub版が存在すればそれを取得しなおすということをしています。そのため、投稿のURLがActivityPub形式だからといってActivityPubで**配信**されたとは限りません。 * ~~IDが異なる関係で、重複検知や返信・ブースト等、既存のトゥートを参照する処理が少しややこしくなっています。~~ どうしようもなかったので統一されました。 * 1.5以下ではまた違うURLになっていたりしますが、もちろんOStatusです。 * ActivityPubでは、鍵をかけていないアカウントのフォローが(内部的には)フォローリクエストと自動承認という形を取るようになっています。 * 画面上の表示としては、これまで通りフォローボタンを押した直後にフォロー済みアイコンに変化しますが、もし自動承認が完了しないうちに再読み込みすると砂時計になります。 * 厳密には砂時計アイコンになるのが正しいですが、自動承認されてもページを読み込むまでアイコンが変化しないこともあり、OStatusの挙動に似せてこのような仕様になりました。 * 一部クライアントはこの修正をあえて回避し、ただちに承認待ちマークを表示するかもしれません。 * 自動的に承認されはするものの、何らかの理由で「承認」メッセージが受け取れない場合に承認待ち状態が続く可能性があります。承認待ちマーク(砂時計)のクリックでリクエストをキャンセルできるようになっているので、もし上手く承認できない場合はキャンセルしてやりなおしてみてください。 * ActivityPubによる配信では、いくつかの機能が追加されています * Aさんが返信を受けると、その返信をAさんのフォロワーのインスタンスにも転送します。こうすることで、それらのインスタンスでも返信が見れることになります。 * トゥートに対する返信であって、@userによるメンションとは別です * これまでトゥートの削除は直接のフォロワーまでしか配信されていませんでしたが、ActivityPubではブーストした人やメンション先、またブーストした人のフォロワーなど、可能な限り削除通知を転送するようになりました。 ## 自動移行の流れ 基本的には、様々な場面で発生するアカウント情報更新のタイミングで、そのアカウントがActivityPubに対応しているかどうかをチェックし、対応しているようであればそれ以降APを使って送信されることになります。 この情報は24時間キャッシュされるため、多くの場合は**1.6への更新後一日前後から**徐々に更新されることになります。 ただし効率化のために、いくつかショートカットが用意されています。 * あるアカウントがActivityPub対応と判定されると、同じインスタンスの全アカウントのキャッシュを失効させます。 * OS判定のアカウントからActivityPubでの配信を受けると、配信元アカウントのキャッシュを失効させ、即座にアカウント情報の更新を行います。通常はこれでActivityPub対応として判定されることになります。 ※前述のとおり、あるアカウントがAPに対応しているかどうか、という情報はインスタンスごとに持っています。そのため一方がAP対応と認識してAP配信を始めたとしても、相手はそう認識していない可能性があります。ショートカット2はこれを考慮したものです。 その後APでの配信を受け取ると自動的にWebSubの購読を解除し、移行が完了します。 こういった仕組みなので、次のような注意点が挙げられます。 * 当該アカウントが全く活動していない場合、いくら待ってもActivityPub対応と判定されない可能性があります。 * 何らかの理由で、こちらはWebSubの購読を解除したのに相手はこちらのことをActivityPub対応と認識していない、という状況になると、相手からの投稿が配信されないことがあります。 管理ページのアカウント一覧で、そのアカウントへの配信がOStatus(WebSub)とActivityPubのどちらで行なわれるかを確認することができます。ActivityPubになっているべきアカウントがOStatusになっていた場合、投稿欄上の検索ボックスでそのアカウントのURL http://example.com/@foo を検索することで、アカウント情報の更新を手動で行なうことができます。 ## v1.6とv2.0 OStatusでは公開範囲を独自拡張でしか表現することができず、例えばGNU Socialで受けとった非公開投稿は誰でも読め、ブーストできてしまう、といった問題がありました。受信者を明示できるActivityPubに移行すれば、このような問題を回避することができます。 そこでv2.0では**非公開(private・direct)な投稿がOStatusで送信されなくなり、v1.6よりも古いMastodonや、OStatusしかサポートしない他実装(GNUSocialなど)で受けとれなくなる**予定です。 公開(public・unlisted)投稿はv2.0以降もActivityPub・OStatusの両方で配信されます。 古いMastodonに非公開投稿が配信されなくなる、という意味で互換性がない変更になるので、移行期間としてv1.6を設けた形です。 もちろん長期的な目標としてはOStatusの廃止もあるようですが、連合でつながっている他の実装のActivityPubサポートの様子を見ながら、ということになるでしょう。 参考 https://mastodon.social/@Gargron/16910940 ## 過去のバグ masterブランチやrcでは過去に以下のような独特なバグが発生していました。もしこのような現象を見かけたら、関係するインスタンスが1.6.0以降まで更新されているか確認してみてください。 (例えば相手の /about/more にはv1.5.1と表示されているのに、流れてきた投稿のタイムスタンプのリンク先は /@user/123 形式になっている、とかだと怪しいです) * ブーストが、ブーストしたユーザーによる通常投稿として表示される * 返信を送ると返信したユーザーまたは返信先のユーザー名義でTLにもうひとつ現われる * private・directな投稿が届かない * 他インスタンスからの投稿が二重に届く * 旧バージョンやその他OStatus実装でフォローユーザー同士の会話が見れない (これはrc2で修正されたので、rc1の頃の会話は今でも見れないことがあります) ## 更新履歴 9/11 * v1.6.0リリースに伴い諸々加筆修正 * OStatus鯖から会話が見れない問題は直りました 9/6 * フォロー時の挙動をOStatusに似せるPRがマージされたので反映 * 1.5以下から見たURLがまちまちな件を追記 * OStatus鯖から会話が見れない可能性について追記

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully