Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { ChatAdapter, IChatGroupAdapter, User, Group, Message, ChatParticipantStatus, ParticipantResponse, ParticipantMetadata, ChatParticipantType, IChatParticipant } from 'ng-chat';
import { Observable, of } from 'rxjs';
import { delay } from "rxjs/operators";
export class DemoAdapter extends ChatAdapter implements IChatGroupAdapter
{
public static mockedParticipants: IChatParticipant[] = [
{
participantType: ChatParticipantType.User,
id: 1,
displayName: "Arya Stark",
avatar: "https://66.media.tumblr.com/avatar_9dd9bb497b75_128.pnj",
status: ChatParticipantStatus.Online
},
{
participantType: ChatParticipantType.User,
id: 2,
displayName: "Cersei Lannister",
avatar: null,
status: ChatParticipantStatus.Online
},
{
participantType: ChatParticipantType.User,
id: 3,
displayName: "Daenerys Targaryen",
{
participantType: ChatParticipantType.User,
id: 1,
displayName: "Arya Stark",
avatar: "https://66.media.tumblr.com/avatar_9dd9bb497b75_128.pnj",
status: ChatParticipantStatus.Online
},
{
participantType: ChatParticipantType.User,
id: 2,
displayName: "Cersei Lannister",
avatar: null,
status: ChatParticipantStatus.Online
},
{
participantType: ChatParticipantType.User,
id: 3,
displayName: "Daenerys Targaryen",
avatar: "https://68.media.tumblr.com/avatar_d28d7149f567_128.png",
status: ChatParticipantStatus.Busy
},
{
participantType: ChatParticipantType.User,
id: 4,
displayName: "Eddard Stark",
avatar: "https://pbs.twimg.com/profile_images/600707945911844864/MNogF757_400x400.jpg",
status: ChatParticipantStatus.Offline
},
{
participantType: ChatParticipantType.User,
id: 5,
displayName: "Hodor",