Notification モジュール
Announcement (お知らせ)
インスタンス管理者がユーザー全体に向けて発信するメッセージ.
TypeScript 上ではお知らせ固有の ID 型を次のように定義する.
export type AnnouncementID = ID<Announcement>;
Announcement は次の属性を持つ.
id:AnnouncementIDtitle:タイトルdescription:本文type:AnnouncementKind(後述)createdAt:作成日時updatedAt:最終更新日時(省略可)unread:未読フラグ
AnnouncementKind (お知らせの種類)
info:一般的なお知らせwarn:ユーザー全体への警告
Notification (通知)
特定のアカウントに向けて発生する通知.
TypeScript 上では通知固有の ID 型を次のように定義する.
export type NotificationID = ID<Notification>;
Notification は次の属性を持つ.
id:NotificationIDtype:NotificationKind(後述)actor:NotificationActor(後述)createdAt:通知発生日時noteId:対象ノートの Snowflake IDmentioned,renoted,reactedのときのみ存在する
content:関連テキストrenotedではリノート元ノートの本文(CW 設定時は空文字列),reactedではリアクション絵文字renotedおよびreactedのときのみ存在する
NotificationKind (通知の種類)
followed:フォローされたfollowRequested:フォローをリクエストされたfollowAccepted:自分のフォローリクエストが承認されたmentioned:メンションされたrenoted:リノートされたreacted:リアクションされた
NotificationActor (通知の発生源)
通知を発生させた主体を表す判別共用体.
account:アカウントによる操作(ボットを含む)id:AccountIDname:AccountNamenickname:表示名avatar:アバター画像の URL
system:システムによる通知(モデレーター警告など)- 詳細は未定義