Bugfix. Avatar wasn't being shown

This commit is contained in:
JC Brand 2017-12-02 18:07:31 +01:00
parent 8662f751e3
commit e701305d05
2 changed files with 1 additions and 4 deletions

View File

@ -221,7 +221,7 @@
_converse.ChatBoxHeading = Backbone.View.extend({
initialize () {
this.model.on('change:image', this.setAvatar, this);
this.model.on('change:image', this.render, this);
this.model.on('change:status', this.onStatusMessageChanged, this);
this.model.on('change:fullname', this.render, this);
},
@ -287,7 +287,6 @@
_.extend(this.model.toJSON(), {
label_personal_message: __('Personal message'),
label_send: __('Send'),
show_avatar: true,
show_send_button: _converse.show_send_button,
show_textarea: true,
show_toolbar: _converse.show_toolbar,

View File

@ -1,11 +1,9 @@
<div class="chat-head chat-head-chatbox">
<a class="chatbox-btn close-chatbox-button icon-close" title="{{{o.info_close}}}"></a>
{[ if (o.show_avatar) { ]}
<img alt="User Avatar"
class="avatar"
height="{{{o.avatar_height}}}px" width="{{{o.avatar_width}}}px"
src="data:{{{o.image_type}}};base64,{{{o.image}}}"/>
{[ } ]}
<div class="chat-title">
{[ if (o.url) { ]}
<a href="{{{o.url}}}" target="_blank" rel="noopener" class="user">