Fix user is not abled to send himself a friend request anymore

master
Max 5 years ago
parent 91e9068fb9
commit f0ebb52619

@ -60,6 +60,7 @@ export class ProfileComponent implements OnInit {
this.userProfile = response;
// tslint:disable-next-line:max-line-length
this.userProfile.allowedToSendRequest = this.requestService.isAllowedToSendRequest(this.userProfile.userID, this.self);
console.log(this.userProfile.allowedToSendRequest);
this.ownProfile = this.userProfile.userID === this.self.userID;
this.rankname = this.levellist.getLevelName(this.userProfile.level);
} else {

@ -19,6 +19,9 @@ export class RequestService {
if (!self.loggedIn) {
return false;
} else {
if (userID === self.userID) {
return false;
}
for (const receiverID of self.sentRequestUserIDs) {
if (userID === receiverID ||
userID === self.userID) {

Loading…
Cancel
Save