[Feature Enhancement]: Support scoped mutes (`onlyReposts` / `onlyQuoteposts`) in `muteActor`
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.ViewerStateDefinitionhas nomutedOnlyReposts/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.
- 主要语言
- Swift
- 星标
- 226
- 派生
- 40
- 平均合并
- 2 小时 56 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MasterJ93/ATProtoKit 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
MasterJ93/ATProtoKit#354 ·
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
MasterJ93/ATProtoKit#352 ·
-
[Feature Enhancement]: Add `sort` parameter to `getQuotes`可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 78/100
MasterJ93/ATProtoKit#346 · 1 条评论 ·
-
[Feature Request]: Add `app.bsky.actor.contentVisibilityDeclaration` record support可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭new feature
难度 3/5 1-2 天 新手友好度 68/100
MasterJ93/ATProtoKit#350 · 4 条评论 ·
-
enhancement
难度 4/5 1-2 天 新手友好度 52/100
MasterJ93/ATProtoKit#337 · 3 条评论 ·
查看 MasterJ93/ATProtoKit 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
good first issue help wanted testing
难度 1/5 1 小时以内 新手友好度 78/100
-
area:cli documentation good first issue priority:low
难度 1/5 1 小时以内 新手友好度 94/100
isaaclins/freesnitch#430 ·
维护者通常 1 天内回复
-
enhancement help wanted
难度 2/5 1-3 小时 新手友好度 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复