rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

Can't resolve 'ng-chat/ng-chat/core/guid' #191

Closed sa2ra closed 3 years ago

sa2ra commented 3 years ago

hello, I have an issue when importing guid: import {Guid} from 'ng-chat/ng-chat/core/guid'; I was trying to do a group adapter so it might be a wrong way to do it my class is:

export class GroupAdapter implements IChatParticipant {

  constructor(participants: User[])
  {
    this.chattingTo = participants;
    this.status = ChatParticipantStatus.Online;

    this.displayName = participants.map((p) => p.displayName).sort((first, second) => second > first ? -1 : 1).join(", ");
  }

  public id: string = Guid.newGuid();
  public chattingTo: User[];
  public readonly participantType: ChatParticipantType = ChatParticipantType.Group;
  public status: ChatParticipantStatus;
  public avatar: string | null;
  public displayName: string;

I was only trying to implement a demo first and I'm new at ng-chat. is there a way to fix it? thank you

sa2ra commented 3 years ago

I just found out that I should be importing a custom class called guid sorry for the inconvenience refrence: https://github.com/rpaschoal/ng-chat/blob/6f67caf2911f339a9f118749719d6f33156ec1da/src/ng-chat/core/guid.ts#L3