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

Commit

Permalink
use mpost instead of webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
meltland2002 committed Feb 5, 2024
1 parent 7641deb commit cb2a38b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
## API
This is the API-based Legacy Devices client. Instead of using your computer as a relay server, this client directly uses the Meower API. This makes it functional without a relay server.

---

The posting feature uses mPost, a service made and hosted by melt. mPost will collect and store your IP address, username, and message content for moderation purposes. Your access to mPost may be terminated at any time for any reason with or without notice. If you do not want this information collected, do not use the posting feature.

## Checklist
This client is **50%** complete as per the Meower Everywhere Feature Checklist (not including non-feasible features)
- [X] - Viewing Posts
Expand Down
7 changes: 4 additions & 3 deletions api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
</head>
<body>
<h2>Meower</h2>
<small id='smalver'>If you're seeing this message, your device might not support/allow JavaScript!</small><br>
<small id='smalver'>If you're seeing this message, something's messed up.</small><br>
<button onclick='document.getElementById("test").innerHTML = "<small></small>"'>Clear</button> <button onclick='checkqueue()'>Fetch</button> <button onclick='toggletheme()'>Change Theme</button><br><br>
<input type='text' id='uname'> <button onclick='setuname()'>Set name!</button> <span id='cuname'>Current username: tester</span><br>
<input type='text' id='post'> <button onclick='post()'>Post!</button>
<input type='text' id='post'> <button onclick='post()'>Post!</button><br>
<small>The posting feature uses mPost, a service made and hosted by melt. mPost will collect and store your IP address, username, and message content for moderation purposes. Your access to mPost may be terminated at any time for any reason with or without notice. If you do not want this information collected, do not use the posting feature.</small>
<p id='test'><small></small></p>
<script type="text/javascript">
const meowerapi = "https://api.meower.org/"
Expand All @@ -28,7 +29,7 @@ <h2>Meower</h2>
function post() { // NOTE: use webhooks here
var xhttp = new XMLHttpRequest();
var compit = document.getElementById("post").value
xhttp.open("POST", "https://webhooks.meower.org/post/home");
xhttp.open("POST", "https://mpost.meltland.dev/home");
xhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
xhttp.send(JSON.stringify({"post": compit, "username": uname}));
document.getElementById("post").value = ""
Expand Down

0 comments on commit cb2a38b

Please sign in to comment.