diff --git a/client/views/actions/topic.tpl b/client/views/actions/topic.tpl index 825b0d1e..b4c26f9a 100644 --- a/client/views/actions/topic.tpl +++ b/client/views/actions/topic.tpl @@ -1,4 +1,4 @@ -{{#if from}} +{{#if from.nick}} {{> ../user_name from}} has changed the topic to: {{else}} diff --git a/client/views/msg.tpl b/client/views/msg.tpl index 64ec97e7..c4087c0c 100644 --- a/client/views/msg.tpl +++ b/client/views/msg.tpl @@ -3,7 +3,7 @@ {{tz time}} - {{#if from}} + {{#if from.nick}} {{> user_name from}} {{/if}} diff --git a/src/models/msg.js b/src/models/msg.js index c48de927..81b8e396 100644 --- a/src/models/msg.js +++ b/src/models/msg.js @@ -7,7 +7,7 @@ var id = 0; class Msg { constructor(attr) { _.defaults(this, attr, { - from: "", + from: {}, id: id++, previews: [], text: "",