Markdown message (half) support
This commit is contained in:
1 parent
e07f8ee05f
commit
eb9a1ad9e8
9 files changed
+147
-92
No files matched your search
+4
-1
@@ -8,13 +8,14 @@ import temporary as tmp
|
||||
MESSAGE_PAGE_SIZE = 256
|
||||
|
||||
class Message:
|
||||
def __init__(self, id, content, sender, time=None, kind='message', subkind=None, thread_id=None):
|
||||
def __init__(self, id, content, sender, time=None, kind='message', subkind=None, format=None, thread_id=None):
|
||||
self.id = id
|
||||
self.content = content
|
||||
self.sender = sender
|
||||
self.time = time
|
||||
self.kind = kind
|
||||
self.subkind = subkind
|
||||
self.format = format
|
||||
self.thread_id = thread_id
|
||||
|
||||
def from_db_record(record):
|
||||
@@ -32,6 +33,8 @@ class Message:
|
||||
"time": self.time,
|
||||
"sender": self.sender,
|
||||
"kind": self.kind,
|
||||
"subkind": self.subkind,
|
||||
"format": self.format,
|
||||
"content": self.content,
|
||||
"threadId": self.thread_id,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user