Skip to content

Implement edit and sticky posts features for Posted boards#282

Open
samuel-asleep wants to merge 3 commits intoRetroShare:masterfrom
samuel-asleep:board-improvement
Open

Implement edit and sticky posts features for Posted boards#282
samuel-asleep wants to merge 3 commits intoRetroShare:masterfrom
samuel-asleep:board-improvement

Conversation

@samuel-asleep
Copy link
Copy Markdown
Contributor

This pull request introduces support for "pinned posts" in boards and adds the ability to edit posts (with proper permission checks) in the RetroShare Posted service. The main changes include updates to data structures and serialization logic to handle pinned posts, and enhancements to the post creation API to support editing with validation of author/admin rights.

Pinned Posts Support:

  • Added a mPinnedPosts field of type RsTlvGxsMsgIdSet to RsPostedGroup and RsGxsPostedGroupItem, along with serialization/deserialization logic and necessary header includes. [1] [2] [3]
  • Updated the serialization and conversion functions in rsitems/rsposteditems.cc to handle the new mPinnedPosts field, ensuring it is properly cleared, copied, and serialized. [1] [2] [3]

Post Editing Functionality:

  • Extended the createPostV2 API to support editing existing posts by adding an optional origPostId parameter, updating all interface declarations and implementations accordingly. [1] [2] [3] [4]
  • Implemented permission checks in p3Posted::createPostV2 to ensure only the original author or a board admin can edit a post, with appropriate error handling and logging.

Miscellaneous:

  • Added missing header includes to several files to support the new features and types. [1] [2] [3] [4]
  • Updated Windows-specific build flags to force-include <cstring> for librnp to resolve a dependency.

@samuel-asleep
Copy link
Copy Markdown
Contributor Author

@defnax @csoler ?

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