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

Update Social.sol #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update Social.sol #1

wants to merge 1 commit into from

Conversation

EastOrb
Copy link

@EastOrb EastOrb commented Jan 30, 2024

  1. registerUser Function:

    • Added checks to ensure that each username is unique and has a length constraint of 32 characters.
    • The function now verifies if the username provided is already taken before registering the user.
  2. createPost Function:

    • Implemented a maximum length constraint of 280 characters for post content to prevent abuse.
    • Added an event emission (PostCreated) after successfully adding a post to provide transparency and allow clients to react to post creation events.
  3. addComment Function:

    • Implemented input validation to ensure that comment content isn't excessively long (limited to 200 characters).
    • Added checks to verify that the comment content is within acceptable limits before adding it to the post.

1. **registerUser Function:**
   - Added checks to ensure that each username is unique and has a length constraint of 32 characters.
   - The function now verifies if the username provided is already taken before registering the user.

2. **createPost Function:**
   - Implemented a maximum length constraint of 280 characters for post content to prevent abuse.
   - Added an event emission (`PostCreated`) after successfully adding a post to provide transparency and allow clients to react to post creation events.

3. **addComment Function:**
   - Implemented input validation to ensure that comment content isn't excessively long (limited to 200 characters).
   - Added checks to verify that the comment content is within acceptable limits before adding it to the post.
Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for decentralized-social-platform canceled.

Name Link
🔨 Latest commit 3efb3e7
🔍 Latest deploy log https://app.netlify.com/sites/decentralized-social-platform/deploys/65b939fdcfb9070008abd897

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