profiles: friend and block through profile page :))
This commit is contained in:
@ -33,8 +33,10 @@ export class Profile extends AExchangeable
|
||||
/**
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.isBlocked = false;
|
||||
this.isFriend = false;
|
||||
this.isFriend;
|
||||
this.isBlocked;
|
||||
this.hasIncomingRequest;
|
||||
this.hasOutgoingRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,6 +59,13 @@ export class Profile extends AExchangeable
|
||||
this.username = response_data.username;
|
||||
this.avatar = response_data.avatar;
|
||||
|
||||
if (!this.client.me || this.client.me.id === this.id)
|
||||
return;
|
||||
|
||||
this.isFriend = this.client.me._isFriend(this);
|
||||
this.isBlocked = this.client.me._isBlocked(this);
|
||||
this.hasIncomingRequest = this.client.me._hasIncomingRequestFrom(this);
|
||||
this.hasOutgoingRequest = this.client.me._hasOutgoingRequestTo(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user