forked from randogoth/lxmf-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlxmf_message_fields.py
35 lines (22 loc) · 1005 Bytes
/
lxmf_message_fields.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from typing import List
#By Liam Cottle
#https://github.com/liamcottle/reticulum-meshchat/blob/master/src/backend/lxmf_message_fields.py
# helper class for passing around an lxmf audio field
class LxmfAudioField:
def __init__(self, audio_mode: int, audio_bytes: bytes):
self.audio_mode = audio_mode
self.audio_bytes = audio_bytes
# helper class for passing around an lxmf image field
class LxmfImageField:
def __init__(self, image_type: str, image_bytes: bytes):
self.image_type = image_type
self.image_bytes = image_bytes
# helper class for passing around an lxmf file attachment
class LxmfFileAttachment:
def __init__(self, file_name: str, file_bytes: bytes):
self.file_name = file_name
self.file_bytes = file_bytes
# helper class for passing around an lxmf file attachments field
class LxmfFileAttachmentsField:
def __init__(self, file_attachments: List[LxmfFileAttachment]):
self.file_attachments = file_attachments