diff --git a/src/app/views/chat/chat.component.html b/src/app/views/chat/chat.component.html index fa17881..489ede2 100644 --- a/src/app/views/chat/chat.component.html +++ b/src/app/views/chat/chat.component.html @@ -1,8 +1,14 @@ - +

Login for seeing the chat.

- + + +

This chat is private, you need to join the travel to see it.

+
+
+ + diff --git a/src/app/views/chat/chat.component.ts b/src/app/views/chat/chat.component.ts index 413e6a9..342cc35 100644 --- a/src/app/views/chat/chat.component.ts +++ b/src/app/views/chat/chat.component.ts @@ -72,8 +72,11 @@ export class ChatComponent implements OnInit, AfterViewInit { return this.chatService.isInRoom(this.roomId); } - get isInvitedToRoom(): boolean { - return this.chatService.isInvitedToRoom(this.roomId); + get needsInvitation(): Promise { + if (this.chatService.isInRoom(this.roomId)) { return new Promise(() => false); } + + + return this.chatService.roomNeedsInvitation(this.roomId); } get members(): RoomMember[] {