Skip to content

Commit

Permalink
newhandle -> changedhandle
Browse files Browse the repository at this point in the history
  • Loading branch information
Bossett committed Nov 5, 2024
1 parent d588ad7 commit a7417d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/getNewLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function getNewLabel({
thisIsEventPost
) {
// this post is the first post after the change
createLabels.add('newhandle')
createLabels.add('changedhandle')
}
postAfterChange = true
}
Expand All @@ -154,7 +154,7 @@ export async function getNewLabel({
if (thisPost) {
if (postBeforeChange && !postAfterChange) {
if (new Date(thisPost.indexedAt).getTime() > handleCreationTime)
createLabels.add('newhandle')
createLabels.add('changedhandle')
}

const record = thisPost.record as AppBskyFeedPost.Record
Expand Down
4 changes: 2 additions & 2 deletions src/lib/processCommit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function _processCommit(commit: Commit): Promise<void> {
labels: currentLabels,
labeller: agentDid,
watchedFrom: handleExpiryThreshold,
handlesToExpire: ['newhandle', 'newaccount'],
handlesToExpire: ['changedhandle'],
}).catch((e) => {
const op: OperationsResult = {
create: [],
Expand Down Expand Up @@ -228,7 +228,7 @@ export function _processCommit(commit: Commit): Promise<void> {
insertListItemOperation(did, labelOperations)

// anything in this list 'refreshed' when it re-triggers
const handlesToReapply = ['newhandle']
const handlesToReapply = ['changedhandle']

labelOperations.create = labelOperations.create.filter(
(label: string) => {
Expand Down

0 comments on commit a7417d8

Please sign in to comment.