Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added announce handling #13

Merged
merged 5 commits into from
Jul 31, 2024
Merged

Added announce handling #13

merged 5 commits into from
Jul 31, 2024

Conversation

mike182uk
Copy link
Member

Added announce handling

refs MOM-280

src/app.ts Outdated
@@ -105,6 +111,13 @@ fedify
)
.setCounter(followingCounter);

fedify
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're using this - then I think we need to remove the custom inbox handler on line 220, as well as the backing code behind it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Didn't realise we already had an inbox handler 🤦‍♂️ I'll move the logic to the existing handler and create an issue to refactor the existing handler to utilise setInboxDispatcher in the future

const thing = await ctx.data.globaldb.get<StoredThing>([result]);

// If the object is a string, it's a URI, so we should to look it up
// in the globalDb. If it's not in the globalDb, we should just
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term we probably want to fetch it from the network and store it - but this is fine for now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I'm following - In the case of Announce we retrieve the announced object and store it at the point of handling the Announce activity. So at this point, we already have the object in the db?

(obviously this is only valid for Announce activities that have been handled by the handler)

@mike182uk mike182uk marked this pull request as ready for review July 31, 2024 09:12
@mike182uk mike182uk force-pushed the initial-announce-handling branch from 0ac916c to 8893c0a Compare July 31, 2024 10:38
@mike182uk mike182uk force-pushed the initial-announce-handling branch from f343e97 to e50bb2a Compare July 31, 2024 14:25
@mike182uk mike182uk merged commit 0154746 into main Jul 31, 2024
1 check passed
@mike182uk mike182uk deleted the initial-announce-handling branch July 31, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants