Mistium / Origin-OS

originOS is a scratch desktop gui made by @Mistium
https://origin.mistium.com
24 stars 9 forks source link

[Suggestion] omail #145

Closed Mistium closed 5 days ago

Mistium commented 1 week ago

A whole new packet type for the server, send a message to a username and have the email accessible by both the user who sent it and recieved it

How the emails are stored:

{
  "id": {
    "title": "",
    "body": "",
    "timestamp": "",
    "recipient": "username"
    "reply":"id"
  },
  "users": {
    "username": [
      "id",
      "id"
    ]
  }
}

How to send an email:

{
  "command": "send_omail",
  "payload": {
    "title": "",
    "body": "",
    "recipient":"",
    "reply":"id" // this one is optional
  }
}

How to get all your mail

{
  "command": "get_omail",
  "payload": ["id","id","id"]
}

Response from get all

{
  "sent": {
    "": "" // omail data
  },
  "received": {
    "": "" // omail data
  }
}

These commands will obviously send the user token for verification with the server

terminal will likely support omail too if I end up supporting it

Mistium commented 6 days ago

import "omail" from "packages"

maybe????

Mistium commented 5 days ago

done