diff options
author | niklas <niklas@niklashalle.net> | 2020-08-24 12:16:53 +0200 |
---|---|---|
committer | niklas <niklas@niklashalle.net> | 2020-08-24 12:16:53 +0200 |
commit | 293b770549597be2099782ab6605a298dbfe5cbf (patch) | |
tree | 8f7f07e533c9e93725c4805c69e2af4d67ee3867 /pysignald/types.py | |
parent | 03056b5664c8a7cf094ae92555fef4d67ab48524 (diff) | |
download | n_frontend_signal-293b770549597be2099782ab6605a298dbfe5cbf.tar.gz n_frontend_signal-293b770549597be2099782ab6605a298dbfe5cbf.zip |
added stuff from pysignald, gonna take over develoment (for us)
Diffstat (limited to 'pysignald/types.py')
-rw-r--r-- | pysignald/types.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pysignald/types.py b/pysignald/types.py new file mode 100644 index 0000000..1b605b3 --- /dev/null +++ b/pysignald/types.py @@ -0,0 +1,24 @@ +import attr + + +@attr.s +class Attachment: + content_type = attr.ib(type=str) + id = attr.ib(type=str) + size = attr.ib(type=int) + stored_filename = attr.ib(type=str) + + +@attr.s +class Message: + username = attr.ib(type=str) + source = attr.ib(type=str) + text = attr.ib(type=str) + source_device = attr.ib(type=int, default=0) + timestamp = attr.ib(type=int, default=None) + timestamp_iso = attr.ib(type=str, default=None) + expiration_secs = attr.ib(type=int, default=0) + is_receipt = attr.ib(type=bool, default=False) + attachments = attr.ib(type=list, default=[]) + quote = attr.ib(type=str, default=None) + group_info = attr.ib(type=dict, default={}) |