mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Limit length of comments to 100 characters
This commit is contained in:
parent
c8595f5522
commit
ede6e8f8e4
1 changed files with 2 additions and 0 deletions
|
@ -144,6 +144,8 @@ public class Database : DbContext
|
|||
|
||||
public async Task<bool> PostComment(User user, int targetId, CommentType type, string message)
|
||||
{
|
||||
if (message.Length > 100) return false;
|
||||
|
||||
if (type == CommentType.Profile)
|
||||
{
|
||||
User? targetUser = await this.Users.FirstOrDefaultAsync(u => u.UserId == targetId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue