Skip to content

Commit

Permalink
Rename ttl -> expiresAt
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Mar 5, 2024
1 parent 7159ef3 commit 3bfe8b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@
"description": "The accounts for which this muted word applies.",
"items": { "type": "string", "format": "did" }
},
"ttl": {
"expiresAt": {
"type": "string",
"description": "The time-to-live for the muted word."
"description": "The date and time at which the muted word will expire and no longer be applied."
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions packages/api/src/bsky-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export class BskyAgent extends AtpAgent {
value: sanitizedValue,
targets: mutedWord.targets || [],
actors: mutedWord.actors || [],
ttl: mutedWord.ttl || undefined,
expiresAt: mutedWord.expiresAt || undefined,
}

if (mutedWordsPref && AppBskyActorDefs.isMutedWordsPref(mutedWordsPref)) {
Expand Down Expand Up @@ -648,7 +648,7 @@ export class BskyAgent extends AtpAgent {
value: updated.value,
targets: updated.targets || [],
actors: updated.actors || [],
ttl: updated.ttl || undefined,
expiresAt: updated.expiresAt || undefined,
}
} else {
return existingItem
Expand Down Expand Up @@ -816,6 +816,6 @@ function migrateLegacyMutedWordsItems(items: AppBskyActorDefs.MutedWord[]) {
...item,
id: item.id || uuid(),
actors: item.actors || [],
ttl: item.ttl || undefined,
expiresAt: item.expiresAt || undefined,
}))
}

0 comments on commit 3bfe8b9

Please sign in to comment.