GitHub
Draft

DM Note

一時的なダイレクトメッセージノート(消えるメッセージ)をActivityPubで配信するための仕様です。 フォロワー限定や特定ユーザー向けの短命なメッセージを実現します。

概要

DM Noteは、endTimeを持つ一時的なNoteを、限定された宛先に配信する機能です。 Instagramの「消えるメッセージ」やSnapchatのような体験をActivityPubで実現します。

特徴

識別子

DM Noteはcontextプロパティで識別します:

urn:dmnote:v1

この識別子により、受信側はNoteがDM Noteであることを認識し、 適切なUI(消えるメッセージとして表示)で処理できます。

配信モード

1. フォロワー限定 (to)

フォロワー全員に配信する場合は、toにフォロワーコレクションを指定します。 通常のCreateアクティビティとして配信されます。

2. 特定ユーザー限定 (bto)

特定のユーザーにのみ配信する場合は、bto(Blind To)を使用します。 btoは配信先には含まれますが、受信者には宛先リストが見えません。

フォロワー限定ノート

フォロワー全員に24時間で消えるメッセージを送信:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://origin.example/activities/aaa",
  "type": "Create",
  "actor": "https://origin.example/users/alice",
  "to": ["https://origin.example/users/alice/followers"],
  "object": {
    "id": "https://origin.example/users/alice/dmnotes/2026-01-14T10:00:00Z",
    "type": "Note",
    "context": "urn:dmnote:v1",
    "attributedTo": "https://origin.example/users/alice",
    "content": "🍜たべたい",
    "mediaType": "text/plain",
    "published": "2026-01-14T10:00:00Z",
    "endTime": "2026-01-15T10:00:00Z",
    "to": ["https://origin.example/users/alice/followers"]
  }
}

特定ユーザー限定ノート (Direct / Mutuals)

特定のユーザーにのみ配信(宛先は受信者に見えない):

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://origin.example/activities/bbb",
  "type": "Create",
  "actor": "https://origin.example/users/alice",
  "bto": [
    "https://remote.example/users/bob",
    "https://remote2.example/users/charlie"
  ],
  "object": {
    "id": "https://origin.example/users/alice/dmnotes/2026-01-14T11:00:00Z",
    "type": "Note",
    "context": "urn:dmnote:v1",
    "attributedTo": "https://origin.example/users/alice",
    "content": "今日いける人?",
    "mediaType": "text/plain",
    "published": "2026-01-14T11:00:00Z",
    "endTime": "2026-01-14T23:00:00Z"
  }
}

メディア付きノート

画像や動画を添付したDM Note:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://origin.example/activities/ccc",
  "type": "Create",
  "actor": "https://origin.example/users/alice",
  "bto": ["https://remote.example/users/bob"],
  "object": {
    "id": "https://origin.example/users/alice/dmnotes/2026-01-14T12:00:00Z",
    "type": "Note",
    "context": "urn:dmnote:v1",
    "attributedTo": "https://origin.example/users/alice",
    "content": "これ見て!",
    "mediaType": "text/plain",
    "published": "2026-01-14T12:00:00Z",
    "endTime": "2026-01-14T12:30:00Z",
    "attachment": [
      {
        "type": "Image",
        "mediaType": "image/jpeg",
        "url": "https://origin.example/media/dmnotes/photo.jpg"
      }
    ]
  }
}

プロパティ

プロパティ 必須 説明
type String 必須 "Note"
context String 必須 "urn:dmnote:v1"
content String 必須 メッセージ本文
mediaType String 推奨 通常 "text/plain"
published DateTime 必須 作成日時
endTime DateTime 必須 有効期限
attachment Array 任意 添付メディア

to vs bto の使い分け

プロパティ 宛先の可視性 ユースケース
to 受信者に見える フォロワー限定投稿、グループメッセージ
bto 受信者に見えない プライベートDM、個別メッセージ
btoについて: bto(Blind To)はActivityPub標準のプロパティです。 配信時には指定されたアクターのinboxに送信されますが、 オブジェクト自体からはbtoフィールドが削除されます。 これにより、受信者は他の誰に送られたか知ることができません。

期限切れの処理

送信側

受信側

実装ガイドライン

UI/UX

通知

セキュリティ

下位互換性

DM Noteは標準のNoteタイプを使用するため、 context: "urn:dmnote:v1"を認識しない実装でも 通常のNoteとして処理できます。

ただし、endTimeを処理しない実装では メッセージが永続的に表示される可能性があります。 これは既知の制限事項です。

Storyとの違い

項目 DM Note Story
type Note ["Story", "Note"]
識別方法 context type
複数フレーム なし あり(frames)
表示時間制御 なし あり(displayDuration)
主な用途 プライベートメッセージ フィード上の一時コンテンツ
配信先 限定(to/bto) 通常はフォロワー

参考