Просмотр исходного кода

ensure to show #notifPageEdited alert even if the user update it at self

Yuki Takei 7 лет назад
Родитель
Сommit
b809fb5ae5
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      resource/js/legacy/crowi.js

+ 2 - 4
resource/js/legacy/crowi.js

@@ -673,12 +673,10 @@ $(function() {
       $b.toggleClass('overlay-on');
     });
 
-    //
-    const me = $('body').data('me');
+    // notification from websocket
     const socket = io();
     socket.on('page edited', function(data) {
-      if (data.user._id != me
-        && data.page.path == pagePath) {
+      if (data.page.path == pagePath) {
         $('#notifPageEdited').show();
         $('#notifPageEdited .edited-user').html(data.user.name);
       }