Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

CL3 rewritten #181

Closed
wants to merge 24 commits into from
Closed

CL3 rewritten #181

wants to merge 24 commits into from

Conversation

tnix100
Copy link
Member

@tnix100 tnix100 commented Apr 2, 2023

Big CL3 rewrite as a temporary improvement while we still develop CL4.

This PR is not complete. It requires one more thing to be added and some extra testing.

Breaking changes:

  • /ip API endpoint deprecated
  • autoget arg on API endpoints is now deprecated and now always return as if autoget was true
  • cmd: direct is no longer required to do a custom Meower command, custom commands can now be ran using root cmd
  • ip, type, version_chk CL3 commands are now deprecated and will just return I:100 | OK
  • pmsg and pvar CL3 commands now have a ratelimit of 10 messages/5 seconds
  • pmsg and pvar no longer return an error if a user is not online (this would break being able to appear offline and it'd be difficult to implement with the new CL server)
  • users can now be logged in on multiple clients at once
  • clients will receive update_config whenever their user config is updated
  • clients will receive update_post whenever a post they have access to is updated
  • clients will receive update_chat whenever a chat they have access to is updated
  • clients will receive delete (like when a post gets deleted) whenever they lose access to a chat they had access to
  • chats won't be deleted when the owner of the chat leaves, it'll only be deleted when there are no members left or the delete_chat command was used
  • users can now hide themselves from the ulist by changing invisible (boolean) in their user config
  • users can now turn off chat invitations by changing the accepting_invitations (boolean) in their user config
  • database has had a few things changed, requiring migration, this will be automatic but may result in data loss if something goes wrong (please backup your database before upgrading)
  • user tokens will be reset and are no longer stored in the database, they will be signed tokens using HMAC
  • statistics now uses estimated document counts instead of precise to help improve database performance (statistics may be a little off at times)
  • server now uses MongoDB text search for searching users/posts instead of relying on regex
  • users can now be temporarily banned
  • an ip's country and whether it's a proxy is now stored in the database
  • ips are now only stored for 90 days since their last usage
  • deleted posts are now only stored for 14 days after their deletion
  • deleting accounts now has a 3 day timeframe where the account owner can log back in to recover the account before it's permanently deleted
  • audit logs are now made for moderation and administration actions

New API endpoints:

  • /logs (can be used by level 2+s to get admin audit log events)

New CL3 commands:

  • gdpr (can be used by level 4s to immediately delete a user's account)
  • join_chat (used to join a chat via an invite code)
  • edit_chat (can be used by the chat owner to edit a chat, can accept nickname, owner, and resetting invite_code)
  • delete_chat (can be used by the chat owner to delete a chat)

@tnix100 tnix100 added CloudLink related For issues specific to the Cloudlink protocol. Server-side labels Apr 2, 2023
@MikeDev101
Copy link
Contributor

Code testing in progress.

@MikeDev101
Copy link
Contributor

MikeDev101 commented Apr 4, 2023

Deployed for testing:

API: testapi.meower.org
CL3: testcl.meower.org

Utilizing a 1:1 copy of the production DB, the clone was completed at 9:31 PM ET today.

tnix100 added 2 commits April 4, 2023 23:54
add exceptions for when a post's author or chat no longer exists
@MikeDev101
Copy link
Contributor

Updating test server now. Going to clone current DB to attempt migration again.

@MikeDev101
Copy link
Contributor

Code updated, working on DB stuff right now

@MikeDev101
Copy link
Contributor

Re-deploying on separate container using a copy of prod DB from 4.12.2023 1:20 PM EDT.

@MikeDev101 MikeDev101 linked an issue Apr 13, 2023 that may be closed by this pull request
@tnix100 tnix100 closed this May 2, 2023
@tnix100 tnix100 deleted the cl3-rewritten branch May 2, 2023 11:24
@tnix100
Copy link
Member Author

tnix100 commented May 2, 2023

Will create new PR. This was just deleted because I renamed cl3-rewritten to develop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CloudLink related For issues specific to the Cloudlink protocol.
Projects
None yet
2 participants