Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@LeNooby09
Copy link


name: several additions and fixes to private posts
about: Private posts

Summary of Changes

This pull request includes several changes to improve the handling of post text and encryption in the post-card component. The most important changes involve adding checks for undefined post text, modifying the decryption function to handle different encryption algorithms and key lengths, and updating the BSkyPost type definition to include optional fields.

Improvements to post text handling:

  • src/components/post-card.tsx: Added a check to ensure the post text is defined before copying it to the clipboard. If the post text is undefined, a message indicating that private posts cannot be copied is shown instead.

Enhancements to decryption process:

  • src/components/post-card.tsx: Updated the decryptPrivatePost function to use the encryption algorithm and key length specified in the post's encryption metadata, improving the flexibility and security of the decryption process. [1] [2]

Updates to type definitions:

  • src/lib/bluesky/types/bsky-post.ts: Modified the BSkyPost type to make the text, akariPublicKey, and encryptedText fields optional. Additionally, added a nested object for the encryption key with key and length properties.

License Agreement

  • [ x ] I understand that my contribution will be released under the CC0 1.0 Universal license and placed in the public domain.

@LeNooby09 LeNooby09 closed this Feb 14, 2025
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.

1 participant