From 97f0ff27d44476c25fa11fb3301d9a61c9131c8d Mon Sep 17 00:00:00 2001 From: ShowierData9978 Date: Wed, 14 Aug 2024 20:29:45 -0500 Subject: [PATCH 1/3] add branding (#285) --- README.md | 60 ++++++++------------------------------ branding/server banner.svg | 22 ++++++++++++++ 2 files changed, 34 insertions(+), 48 deletions(-) create mode 100644 branding/server banner.svg diff --git a/README.md b/README.md index eff417a..a911287 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,20 @@ -# Meower-Server +![](https://raw.githubusercontent.com/meower-media/server/add-branding/branding/server%20banner.svg) +# Server Official source code of the Meower server, written in Python. Powered by CloudLink. -## NOTICE -This is the APIv0 Branch of Code! This API code will only be maintained up until when New Meower is released. - -APIv0 will be upgraded automatically to APIv1 when Beta 6 is released. The API can be found at https://api.meower.org/ - -## Installing Dependencies -* Run `pip3 install -r requirements.txt` in the downloaded and unzipped directory - -## Running the server - +## Running ```py -git clone https://github.com/meower-media-co/Meower-Server.git --recursive +git clone https://github.com/meower-media/server.git --recursive cd Meower-Server -python3 main.py -``` - -To connect to the server, change the IP settings of your client to connect to ws://127.0.0.1:3000/. - -### Rest API - -This Rest API is configured to use CF Argo Tunnels for getting client IPs, but otherwise everything will function. - -Currently supported functions of the API: - -* /home - Gets the current homepage index. -* /home?page=# - Lets you get a certain page # of the homepage. -* /home?autoget - Automatically fetches all posts currently present on the page. -* /ip - Gets the client's IP address and returns with plaintext. Only works if the server is communicating with a client over CF Argo Tunnels. -* /posts?id=(Post ID) - Gets a Post ID, use /home to get an index of posts. -* /status - Status for the Meower Server. -* /posts/(Chat ID) - Gets the specified chat ID's index. -* /reports - Gets the reports index (only accessable if a moderator or higher. -* /inbox - Gets the specified user's inbox. -* /search/home?q=(Query) - Searches home. -* /search/users?q=(Query) - Searches users. -* /users/(Username) - Gets the specified user's info. -* /users/(Username)/posts - Gets the specified user's posts. -* /statistics - Shows Meower's statistics (users, posts, and chats) -### Trust keys and access control +cd Meower-Server +pip install -r requirements.txt -In development, Meower is configured to use "meower" as a CloudLink Trust key. If you notice a forked server using this key, please request for it to be removed. This key is intended for development purposes only. +cp .env.example .env -Meower is configured to use CloudLink's Trusted Access feature, which implements the following security features: -1. IP blocker feature -2. Client kicking -3. Trust keys -4. Protection from maliciously modified clients +# edit env files -## Contributing to the source +python3 main.py +``` -1. Make a fork of the repo -2. Modify your source -3. Open a PR +## API docs +See [the autogenerated documentation](https://api.meower.org/docs) and the [Meower documentation](https://docs.meower.org) diff --git a/branding/server banner.svg b/branding/server banner.svg new file mode 100644 index 0000000..7c3a841 --- /dev/null +++ b/branding/server banner.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + From f1ea572e29c35434c48fe8e3516f929c05ee0fc5 Mon Sep 17 00:00:00 2001 From: ShowierData9978 Date: Wed, 14 Aug 2024 21:38:02 -0500 Subject: [PATCH 2/3] Update README.md (#290) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a911287..0a6f5c9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![](https://raw.githubusercontent.com/meower-media/server/add-branding/branding/server%20banner.svg) +![](./branding/server%20banner.svg) # Server Official source code of the Meower server, written in Python. Powered by CloudLink. From 515cc8d05e27978eb141e0af2dadb448ee9426e3 Mon Sep 17 00:00:00 2001 From: Tnix Date: Tue, 20 Aug 2024 23:39:44 +1200 Subject: [PATCH 3/3] fix admin chat post fetching --- rest_api/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_api/admin.py b/rest_api/admin.py index 4969d45..5240fdc 100644 --- a/rest_api/admin.py +++ b/rest_api/admin.py @@ -1086,7 +1086,7 @@ async def get_chat_posts(chat_id, query_args: GetChatPostsQueryArgs): # Return posts return { "error": False, - "autoget": app.supporter.parse_posts_v0(post, requester=request.user), + "autoget": app.supporter.parse_posts_v0(posts, requester=request.user), "page#": query_args.page, "pages": get_total_pages("posts", query) }, 200