5180 fichiers 38.5 Mo 0 téléchargements 209 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / api / friends / MessengerThreadChatGroup.ts
MessengerThreadChatGroup.ts 1.1 Ko Télécharger le fichier
import { MessengerGroupType } from './MessengerGroupType';
import { MessengerThreadChat } from './MessengerThreadChat';

export class MessengerThreadChatGroup {
    private _userId: number;
    private _chats: MessengerThreadChat[];
    private _type: number;

    constructor(userId: number, type = MessengerGroupType.PRIVATE_CHAT) {
        this._userId = userId;
        this._chats = [];
        this._type = type;
    }

    /** A copy with its own list of copied lines. */
    public clone(): MessengerThreadChatGroup {
        const copy = new MessengerThreadChatGroup(this._userId, this._type);

        copy._chats = this._chats.map((chat) => chat.clone());

        return copy;
    }

    public addChat(message: MessengerThreadChat): void {
        this._chats.push(message);
    }

    public get userId(): number {
        return this._userId;
    }

    public get chats(): MessengerThreadChat[] {
        return this._chats;
    }

    public get type(): number {
        return this._type;
    }

    public set type(type: number) {
        this._type = type;
    }
}
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser