mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-06-22 13:14:15 -04:00
Conversation class skeleton
This commit is contained in:
parent
ab388cf830
commit
c039ff2e2a
1 changed files with 17 additions and 0 deletions
17
nomadnet/Conversation.py
Normal file
17
nomadnet/Conversation.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import os
|
||||||
|
import RNS
|
||||||
|
import LXMF
|
||||||
|
|
||||||
|
class Conversation:
|
||||||
|
@staticmethod
|
||||||
|
def ingest(lxmessage, app):
|
||||||
|
source_hash_path = RNS.hexrep(lxmessage.source_hash, delimit=False)
|
||||||
|
conversation_path = app.conversationpath + "/" + source_hash_path
|
||||||
|
|
||||||
|
if not os.path.isdir(conversation_path):
|
||||||
|
os.makedirs(conversation_path)
|
||||||
|
|
||||||
|
lxmessage.write_to_directory(conversation_path)
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
Loading…
Add table
Add a link
Reference in a new issue