error websocket sur invité

This commit is contained in:
afornerot 2019-08-26 15:08:34 +02:00
parent 25089400ce
commit 30fe301f34
1 changed files with 6 additions and 2 deletions

View File

@ -284,7 +284,8 @@
if(payload.alert) {
alert(payload.alert);
}
if(payload.from!={{app.user.id}}) {
{% if app.user %}
if(payload.from!="{{app.user.id}}") {
menu=$("a[data-group='"+payload.group+"']");
if(menu.length) {
if(payload.add) {
@ -296,12 +297,15 @@
}
}
}
{% endif %}
});
$(document).on('click', '#refreshcounter', function(){
{% if app.user %}
event=$(this).data("event");
event.userid={{app.user.id}}
session.publish("websocket/counter", event);
{% endif %}
});
});
{% endif %}