summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rwxr-xr-xstatic/pichat.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/static/pichat.js b/static/pichat.js
index 435dc0d..81882fe 100755
--- a/static/pichat.js
+++ b/static/pichat.js
@@ -35,9 +35,14 @@ function buildMessageDiv(msg) {
}
function buildUserDiv(user) {
- return '<div class="username"><a href="/u/' + escapeHtml(user.nick) + '">' +
+ if (user.avatar) {
+ return '<div class="username"><a href="/u/' + escapeHtml(user.nick) + '">' +
'<img src="' + user.avatar + '" width="50" height="50">' +
escapeHtml(user.nick) + '</a></div>';
+ } else {
+ return '<div class="username"><a href="/u/' + escapeHtml(user.nick) + '">' +
+ escapeHtml(user.nick) + '</a></div>';
+ }
}
function handleMsgError(resp) {