瀏覽代碼

Don't load conversation with own contact

Danilo Bargen 8 年之前
父節點
當前提交
8132996edf
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/partials/messenger.ts

+ 7 - 0
src/partials/messenger.ts

@@ -244,6 +244,13 @@ class ConversationController {
         // Close any showing dialogs
         this.$mdDialog.cancel();
 
+        // Check if this is our own contact
+        if (this.webClientService.me.id === $stateParams.id) {
+            $log.warn('ConversationController: Cannot show own contact, redirecting to home');
+            $state.go('messenger.home');
+            return;
+        }
+
         this.maxTextLength = this.webClientService.getMaxTextLength();
 
         // On every navigation event, close all dialogs.