mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
Move all zephyr HTML generation to the client
(imported from commit 3afec768a5cd220c14ce615e03c29ee22754fdf2)
This commit is contained in:
@@ -76,6 +76,14 @@ class Zephyr(models.Model):
|
||||
display_recipient = get_display_recipient(self.recipient)
|
||||
return "<Zephyr: %s / %s / %r>" % (display_recipient, self.instance, self.sender)
|
||||
|
||||
def to_dict(self):
|
||||
return {'id' : self.id,
|
||||
'sender' : self.sender.user.username,
|
||||
'type' : self.recipient.type,
|
||||
'display_recipient': get_display_recipient(self.recipient),
|
||||
'instance' : self.instance,
|
||||
'content' : self.content }
|
||||
|
||||
def send_zephyr(**kwargs):
|
||||
zephyr = kwargs["instance"]
|
||||
if zephyr.recipient.type == "personal":
|
||||
|
||||
Reference in New Issue
Block a user