mirror of
https://github.com/markqvist/LXMF.git
synced 2026-01-10 04:31:03 -05:00
Merge 1200dceb4c into 6ecd271e48
This commit is contained in:
commit
9b9553c8a9
1 changed files with 11 additions and 3 deletions
|
|
@ -784,8 +784,16 @@ class LXMessage:
|
|||
message.timestamp = timestamp
|
||||
message.packed = lxmf_bytes
|
||||
message.packed_size = len(lxmf_bytes)
|
||||
message.set_title_from_bytes(title_bytes)
|
||||
message.set_content_from_bytes(content_bytes)
|
||||
|
||||
if type(title_bytes) is bytes:
|
||||
message.set_title_from_bytes(title_bytes)
|
||||
elif type(title_bytes) is str:
|
||||
message.set_title_from_string(title_bytes)
|
||||
|
||||
if type(content_bytes) is bytes:
|
||||
message.set_content_from_bytes(content_bytes)
|
||||
elif type(content_bytes) is str:
|
||||
message.set_content_from_string(content_bytes)
|
||||
|
||||
try:
|
||||
if source:
|
||||
|
|
@ -822,4 +830,4 @@ class LXMessage:
|
|||
return lxm
|
||||
except Exception as e:
|
||||
RNS.log("Could not unpack LXMessage from file. The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||
return None
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue