Mastodon
  • 什么是 Mastodon?
  • 使用 Mastodon
    • 注册帐户
    • 设置你的个人资料
    • 在你的账户发布内容
    • 使用网络功能
    • 处理不想看到的内容
    • 推广你和他人
    • 进行偏好设置
    • 更多设置
    • 在站点外使用 Mastodon
    • 迁移或离开账户
    • 运行你自己的站点
  • 运营 Mastodon
    • 准备你的服务器
    • 从源代码安装
    • 配置你的环境
    • 安装可选功能
      • 对象存储
      • 洋葱服务
      • 验证码
      • 单点登录
    • 配置全文搜索
    • 设置你的新实例
    • 使用管理 CLI
    • 升级到新版本
    • 备份你的服务器
    • 迁移到新机器
    • 扩大你的站点规模
    • 审核操作
    • 故障排除
      • 数据库索引损坏
    • 用户组
  • 开发 Mastodon 应用
    • API 入门指南
    • 使用公开数据
    • 获取客户端应用访问权限
    • 使用帐户登录
    • 库与实现
  • 向 Mastodon 项目做贡献
    • 技术概览
    • 设置开发环境
    • 代码结构
    • 路由
    • 漏洞赏金与责任披露
  • 遵循的标准
    • ActivityPub
    • WebFinger
    • 安全性
    • Microformats
    • OAuth
    • Bearcaps
  • REST API
    • Datetime 格式
    • 指南与最佳实践
    • OAuth 令牌
    • OAuth 作用域
    • 速率限制
  • API 方法
    • apps
      • oauth
      • emails
    • accounts
      • bookmarks
      • favourites
      • mutes
      • blocks
      • domain_blocks
      • filters
      • reports
      • follow_requests
      • endorsements
      • featured_tags
      • preferences
      • followed_tags
      • suggestions
      • tags
    • profile
    • statuses
      • media
      • polls
      • scheduled_statuses
    • timelines
      • conversations
      • lists
      • markers
      • streaming
    • grouped notifications
    • notifications
      • push
    • search
    • instance
      • trends
      • directory
      • custom_emojis
      • announcements
    • admin
      • accounts
      • canonical_email_blocks
      • dimensions
      • domain_allows
      • domain_blocks
      • email_domain_blocks
      • ip_blocks
      • measures
      • reports
      • retention
      • trends
    • proofs
    • oembed
  • API 实体
    • Account
    • AccountWarning
    • Admin::Account
    • Admin::CanonicalEmailBlock
    • Admin::Cohort
    • Admin::Dimension
    • Admin::DomainAllow
    • Admin::DomainBlock
    • Admin::EmailDomainBlock
    • Admin::Ip
    • Admin::IpBlock
    • Admin::Measure
    • Admin::Report
    • Announcement
    • Appeal
    • Application
    • Context
    • Conversation
    • CustomEmoji
    • DomainBlock
    • Error
    • ExtendedDescription
    • FamiliarFollowers
    • FeaturedTag
    • Filter
    • FilterKeyword
    • FilterResult
    • FilterStatus
    • IdentityProof
    • Instance
    • List
    • Marker
    • MediaAttachment
    • Notification
    • NotificationPolicy
    • NotificationRequest
    • Poll
    • Preferences
    • PreviewCard
    • PreviewCardAuthor
    • PrivacyPolicy
    • Reaction
    • Relationship
    • RelationshipSeveranceEvent
    • Report
    • Role
    • Rule
    • ScheduledStatus
    • Search
    • Status
    • StatusEdit
    • StatusSource
    • Suggestion
    • Tag
    • TermsOfService
    • Token
    • Translation
    • V1::Filter
    • V1::Instance
    • V1::NotificationPolicy
    • WebPushSubscription

Notification

表示与用户相关的事件通知。

    • 属性
      • id
      • type
      • group_key
      • created_at
      • account
      • status 可选
      • report 可选
      • event 可选
      • moderation_warning 可选
    • 示例
      • Mention
      • Favourite
    • 另请参考

属性

id

描述: 数据库中通知的 ID。
类型: 字符串 (从整数转换而来,但不保证是一个数字)
版本历史:
0.9.9 - 添加

type

描述: 导致通知的事件类型。
类型: 字符串 (可枚举 oneOf)
mention = 有人在他们的嘟文中提到了你
status = 你启用了发嘟通知的用户发布了嘟文
reblog = 有人转发了你的一条嘟文
follow = 有人关注了你
follow_request = 有人请求关注你
favourite = 有人喜欢了你的一条嘟文
poll = 你投票或创建的投票已结束
update = 你转发的嘟文已被编辑
admin.sign_up = 有人注册了(可选择发送给管理员)
admin.report = 有新的举报被提交
severed_relationships = 由于管理或屏蔽事件,你的一些关注关系已被切断
moderation_warning = 管理员已对你的帐户采取了行动或向你发送了警告
版本历史:
0.9.9 - 添加
2.8.0 - 添加 poll
3.1.0 - 添加 follow_request
3.3.0 - 添加 status
3.5.0 - 添加 update and admin.sign_up
4.0.0 - 添加 admin.report
4.3.0 - 添加 severed_relationships and moderation_warning

group_key

描述: 类似通知共享的群组键,用于分组通知功能。应被视为不透明,但可以假定未分组的通知具有 group_key 形式 ungrouped-{notification_id}。 类型: 字符串
版本历史:
4.3.0 - 添加

created_at

描述: 通知的时间戳。
类型: (Datetime) 字符串
版本历史:
0.9.9 - 添加

account

描述: 执行了生成通知的操作的帐户。
类型: Account
版本历史:
0.9.9 - 添加

status 可选

描述: 作为通知对象的嘟文。当通知的 type 为 favourite、reblog、status、mention、poll 或 update 时附加。
类型: Status
版本历史:
0.9.9 - 添加

report 可选

描述: 作为通知对象的举报。当通知的 type 为 admin.report 时附加。
类型: Report
版本历史:
4.0.0 - 添加

event 可选

描述: 导致关注关系中断的事件摘要。当通知的 type 为 severed_relationships 时附加。
类型: RelationshipSeveranceEvent
版本历史:
4.3.0 - 添加

moderation_warning 可选

描述: 导致通知的管理警告。当通知的 type 为 moderation_warning 时附加。
类型: AccountWarning
版本历史:
4.3.0 - 添加

示例

Mention


  {
    "id": "34975861",
    "type": "mention",
    "created_at": "2019-11-23T07:49:02.064Z",
    "account": {
      "id": "971724",
      "username": "zsc",
      "acct": "zsc",
      // ...
    },
    "status": {
      "id": "103186126728896492",
      "created_at": "2019-11-23T07:49:01.940Z",
      "in_reply_to_id": "103186038209478945",
      "in_reply_to_account_id": "14715",
      // ...
    }
  }

Favourite

  {
    "id": "34975535",
    "type": "favourite",
    "created_at": "2019-11-23T07:29:18.903Z",
    "account": {
      "id": "297420",
      "username": "haskal",
      "acct": "haskal@cybre.space",
      // ...
    },
    "status": {
      "id": "103186046267791694",
      "created_at": "2019-11-23T07:28:34.210Z",
      // ...
      "account": {
        "id": "14715",
        "username": "trwnh",
        "acct": "trwnh",
        // ...
      },
      // ...
    }
  }

另请参考

notifications API 方法
app/serializers/rest/notification_serializer.rb

翻译状态: 本文是英文页面 Notification 的翻译,最后翻译时间:2025-04-21,点击这里可以查看翻译后页面的改动。

最后更新于 April 21, 2025 · 改进此页面
也可在此找到: English

赞助商

Dotcom-Monitor LoadView Stephen Tures Swayable SponsorMotion

加入Mastodon · 博客 ·

查看源代码 · CC BY-SA 4.0 · 版权信息