diff options
author | Stavros Korokithakis <hi@stavros.io> | 2018-12-06 17:14:15 +0200 |
---|---|---|
committer | Stavros Korokithakis <hi@stavros.io> | 2018-12-06 17:14:15 +0200 |
commit | ebcdbfa987cfd0434a0915e22905a471d7fbd31b (patch) | |
tree | f8ebd1b5f7a43b09f7a5c2a43c36cd070d9cc24c /signald/types.py | |
parent | 4770bd2f277eac1a11ae3cfbe5757f5ce67b1982 (diff) | |
download | pysignald-ebcdbfa987cfd0434a0915e22905a471d7fbd31b.tar.gz pysignald-ebcdbfa987cfd0434a0915e22905a471d7fbd31b.zip |
Add message type
Diffstat (limited to 'signald/types.py')
-rw-r--r-- | signald/types.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/signald/types.py b/signald/types.py index 814b967..75cdcbd 100644 --- a/signald/types.py +++ b/signald/types.py @@ -2,5 +2,21 @@ 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: - pass + username = attr.ib(type=str) + source = attr.ib(type=str) + message = 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) + attachments = attr.ib(type=list, default=[]) + quote = attr.ib(type=str, default=None) |