mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +00:00
Separate the global message data from the list display data
The messages being passed to the handlebars templates were global messages which we were adding per list details to, show name bar etc. This causes rendering bugs when you try to rerender a message, because a different list may have changed it. This commit moves the global message data to a msg attribute on the message_container which will contain the per list attributes. (imported from commit 26b1f0d2c72d6288a6d3e7ed5f8692426f2a97ad)
This commit is contained in:
@@ -238,6 +238,7 @@ function render(template_name, args) {
|
||||
|
||||
(function single_message() {
|
||||
var message = {
|
||||
msg: {
|
||||
include_recipient: true,
|
||||
display_recipient: 'devel',
|
||||
subject: 'testing',
|
||||
@@ -245,6 +246,7 @@ function render(template_name, args) {
|
||||
content: 'This is message one.',
|
||||
last_edit_timestr: '11:00',
|
||||
starred: true
|
||||
}
|
||||
};
|
||||
|
||||
var html = render('single_message', message);
|
||||
|
||||
Reference in New Issue
Block a user