mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-22 09:19:01 +00:00
Prevent users from hearting themselves
This commit is contained in:
parent
a0d021f1e2
commit
425245fd07
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ public partial class DatabaseContext
|
||||||
|
|
||||||
public async Task HeartUser(int userId, UserEntity heartedUser)
|
public async Task HeartUser(int userId, UserEntity heartedUser)
|
||||||
{
|
{
|
||||||
|
if (userId == heartedUser.UserId) return;
|
||||||
|
|
||||||
HeartedProfileEntity? heartedProfile = await this.HeartedProfiles.FirstOrDefaultAsync(q => q.UserId == userId && q.HeartedUserId == heartedUser.UserId);
|
HeartedProfileEntity? heartedProfile = await this.HeartedProfiles.FirstOrDefaultAsync(q => q.UserId == userId && q.HeartedUserId == heartedUser.UserId);
|
||||||
if (heartedProfile != null) return;
|
if (heartedProfile != null) return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue