[Feature Enhancement]: Support scoped mutes (`onlyReposts` / `onlyQuoteposts`) in `muteActor`

Đang mở
#348 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

@KC-2001MS đang làm issue này rồi.

Từ ngày 16/11/2026.

  • #349 của @KC-2001MS — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
swift
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by locating MuteActorRequestBody, muteActor(_:), and ViewerStateDefinition in the AppBskyLexicon and ATProtoKit sources, then read the existing request and viewer state tests. Add support for the two scope inputs and corresponding viewer state fields using the lexicon names in the issue. Done when scoped mute requests encode correctly, viewer state decodes both fields, and tests cover calls with and without a scope.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Summary

The app.bsky.graph.muteActor lexicon now accepts onlyReposts and onlyQuoteposts in its input, and app.bsky.actor.defs#viewerState now includes mutedOnlyReposts and mutedOnlyQuoteposts. ATProtoKit supports neither: MuteActorRequestBody only has actor, and ViewerStateDefinition has no properties for the two new fields.

Pain points
  • muteActor(_:) can only create a full mute, so a scoped mute (e.g. hiding only an account's reposts) can't be created.
  • ViewerStateDefinition has no mutedOnlyReposts / mutedOnlyQuoteposts, so there is no way to tell whether a scoped mute is active.
Considered Alternatives

Sending the muteActor request manually and fetching profiles as raw JSON to read the viewer state.

Is this a breaking change?

No

Additional Context

Proposed changes:

// AppBskyLexicon.Graph.MuteActorRequestBody
public let isOnlyReposts: Bool?      // "onlyReposts"
public let isOnlyQuotePosts: Bool?   // "onlyQuoteposts"

// ATProtoKit
public func muteActor(
    _ actor: String,
    isOnlyReposts: Bool? = nil,
    isOnlyQuotePosts: Bool? = nil
) async throws

// AppBskyLexicon.Actor.ViewerStateDefinition
public let areRepostsMuted: Bool?    // "mutedOnlyReposts"
public let areQuotePostsMuted: Bool? // "mutedOnlyQuoteposts"

Per the lexicon, calling muteActor again on an existing mute replaces its stored scope instead of merging it, and a call with no scope set creates a full mute. unmuteActor is unchanged.

Ngôn ngữ chính
Swift
Star
226
Fork
40
Merge trung bình
2 giờ 56 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MasterJ93/ATProtoKit

Tất cả issue của MasterJ93/ATProtoKit

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.