diff --git a/src/user/contact.ts b/src/user/contact.ts index 3263e58abaaed644341cfc891ad801a1c2e26109..b18e62b86f2854beb695fb495124d9e7fd429d50 100644 --- a/src/user/contact.ts +++ b/src/user/contact.ts @@ -257,19 +257,15 @@ export class Contact extends Accessory implements Sayable { */ protected payload?: ContactPayload - public readonly id: string // Contact Id - /** * @private */ constructor ( - id: string, + public readonly id: string, ) { super() log.silly('Contact', `constructor(${id})`) - this.id = id - // tslint:disable-next-line:variable-name const MyClass = instanceToClass(this, Contact) diff --git a/src/user/friendship.ts b/src/user/friendship.ts index b54cafb4ae0d4fdf4ede62007f438fdc0b501e0e..ee8aef42dcfc1983fe86f7c368d6559b2c63c321 100644 --- a/src/user/friendship.ts +++ b/src/user/friendship.ts @@ -114,42 +114,6 @@ export class Friendship extends Accessory implements Acceptable { throw new Error('to be implemented') } - // public static createConfirm( - // contactId: string, - // ): FriendRequestPayload { - // log.verbose('Friendship', 'createConfirm(%s)', - // contactId, - // ) - - // const payload: FriendRequestPayloadConfirm = { - // type : FriendRequestType.Confirm, - // contactId, - // } - - // return payload - // } - - // public static createReceive( - // contactId : string, - // hello : string, - // ticket : string, - // ): FriendRequestPayload { - // log.verbose('Friendship', 'createReceive(%s, %s, %s)', - // contactId, - // hello, - // ticket, - // ) - - // const payload: FriendRequestPayloadReceive = { - // type : FriendRequestType.Receive, - // contactId, - // hello, - // ticket, - // } - - // return payload - // } - /** * * Instance Properties @@ -162,7 +126,7 @@ export class Friendship extends Accessory implements Acceptable { protected payload?: FriendshipPayload constructor ( - public id: string, + public readonly id: string, ) { super() log.verbose('Friendship', 'constructor(id=%s)', id) diff --git a/src/user/room-invitation.ts b/src/user/room-invitation.ts index fbd4ba9598ac4420c736ffd5aab9fa6b9c87f37a..5f9ae15e1bbf7b5e33318474432e299b74fb4f85 100644 --- a/src/user/room-invitation.ts +++ b/src/user/room-invitation.ts @@ -55,7 +55,7 @@ export class RoomInvitation extends Accessory implements Acceptable { * */ constructor ( - public id: string, + public readonly id: string, ) { super() log.verbose('RoomInvitation', 'constructor(id=%s)', id) diff --git a/src/user/room.ts b/src/user/room.ts index c6d059fc1789ce6f056117a74d837633926583ac..965757b619b08b73487d26444f7383cb7ace2a46 100644 --- a/src/user/room.ts +++ b/src/user/room.ts @@ -269,19 +269,15 @@ export class Room extends Accessory implements Sayable { */ protected payload?: RoomPayload - public readonly id: string // Room Id - /** * @private */ constructor ( - id: string, + public readonly id: string, ) { super() log.silly('Room', `constructor(${id})`) - this.id = id - // tslint:disable-next-line:variable-name const MyClass = instanceToClass(this, Room)