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

Change payload to allow future lists #64

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

dcadenas
Copy link
Contributor

@dcadenas dcadenas commented Aug 30, 2024

This change makes the payload ready for integration with the app according to the comment in planetary-social/nos#1447 (comment)

The payload coming from the pubsub will be changed in future work in the followers server

Copy link
Member

@mplorentz mplorentz left a comment

Choose a reason for hiding this comment

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

Is this changing the payload only for the new follow notifications or does it change the old silent notifications for mentions and replies too?

@dcadenas
Copy link
Contributor Author

It's only for the follow notifications

@dcadenas
Copy link
Contributor Author

dcadenas commented Sep 2, 2024

@mplorentz I added the rest of the changes to accomodate to a new type of payload that can handle batches of follows and unfollows in a single notification so we now can add some code in the followers server to have notifications like You have 29 new followers and 29 unfollows!. The payload will include the npubs of each of these, no friendly strings as we don't even show them in these cases and I also added some tests to find which is the maximum we can stuff (58 npubs in total) before hitting the payload limit of 4096.

This is behind a feature flag and is well tests so I'll go ahead and merge so I don't get blocked during this holiday, but of course feel free to review. I also wanted you see how the payload is constructed because you or someone else from the iOS team will consume the payloads

@dcadenas dcadenas merged commit 468eb4c into main Sep 2, 2024
1 check passed
@dcadenas dcadenas deleted the change-follow-notification-payload branch September 2, 2024 14:36
@mplorentz
Copy link
Member

Sounds good! Just want to make sure you are syncing with Linda on these behavior changes if you haven't already.

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