stable remote app
This commit is contained in:
parent
ae6bf0f96d
commit
2287ddd6f1
10 changed files with 8 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7
mail.py
7
mail.py
|
|
@ -30,7 +30,8 @@ class Mail:
|
|||
owner = self.crimata_id
|
||||
target = p.get("target")
|
||||
text = p.get("text")
|
||||
mail = typs.Mail(owner, target, text)
|
||||
audio = p.get("audio")
|
||||
mail = typs.Mail(owner, target, text, audio)
|
||||
return mail
|
||||
|
||||
@staticmethod
|
||||
|
|
@ -38,8 +39,8 @@ class Mail:
|
|||
name = "message"
|
||||
params = {
|
||||
"owner": mail.owner,
|
||||
"text": mail.text #dev only
|
||||
"text": mail.text, #dev only
|
||||
"audio": mail.audio
|
||||
}
|
||||
intent = typs.Intent(name, params)
|
||||
return intent
|
||||
|
||||
|
|
@ -22,6 +22,7 @@ class Schemes:
|
|||
print(f"Initalized for {self.crimata_id}")
|
||||
|
||||
# Push message to anoter Crimata ID.
|
||||
#! Push message to backend.
|
||||
def message(self, intent):
|
||||
text = intent.params.get("text")
|
||||
target = intent.params.get("target") #crimata_id
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class Session(schemes.Schemes, agent.Agent, mail.Mail):
|
|||
self.handle_intent(intent)
|
||||
|
||||
# Send mail back to agent.
|
||||
#! Pulling message from backend.
|
||||
async def deliver_mail(self):
|
||||
while self.on:
|
||||
|
||||
|
|
|
|||
1
typs.py
1
typs.py
|
|
@ -10,6 +10,7 @@ class Mail:
|
|||
self.owner = owner
|
||||
self.target = target
|
||||
self.text = text
|
||||
self.audio = audio
|
||||
|
||||
|
||||
class MailBox:
|
||||
|
|
|
|||
Loading…
Reference in a new issue