Add forwarding, friend controls, and benefits

Add message forwarding and reply lookup, friend removal and blocking endpoints, and database-backed Govor+ privileges with customizable profile tags. Include migrations, integration tests, and updated API and operations documentation.
This commit is contained in:
Artemy
2026-10-31 18:29:40 +07:00
parent a3401ceedf
commit 632ac04b56
78 changed files with 5284 additions and 720 deletions
+6 -2
View File
@@ -312,7 +312,8 @@ public class ChatsHub : Hub
RecipientType: request.RecipientType,
SendAt: _nowDateTimeProvider.Now,
Media: request.MediaAttachments?.Select(f => new SendMedia(f.MediaId, f.EncryptedKey))
?? Array.Empty<SendMedia>()
?? Array.Empty<SendMedia>(),
ForwardedFromMessageId: request.ForwardedFromMessageId
);
}
@@ -328,7 +329,10 @@ public class ChatsHub : Hub
SentAt = message.SentAt,
IsEdited = false,
MediaAttachments = message.MediaAttachments.Select(m => m.MediaFile).ToList(),
ReplyToMessageId = replyToId
ReplyToMessageId = replyToId,
ForwardedFromMessageId = message.ForwardedFromMessageId,
ForwardedFromUserId = message.ForwardedFromUserId,
ForwardedFromSentAt = message.ForwardedFromSentAt
};
}
}
@@ -40,7 +40,10 @@ public class ChatPushDispatcher(GovorDbContext context, IChatNotificationService
{
MessageId = m.Id, SenderId = m.SenderId, RecipientId = m.RecipientId,
RecipientType = m.RecipientType, EncryptedContent = m.EncryptedContent,
SentAt = m.SentAt, ReplyToMessageId = m.ReplyToMessageId
SentAt = m.SentAt, ReplyToMessageId = m.ReplyToMessageId,
ForwardedFromMessageId = m.ForwardedFromMessageId,
ForwardedFromUserId = m.ForwardedFromUserId,
ForwardedFromSentAt = m.ForwardedFromSentAt
}).FirstOrDefaultAsync(cancellationToken);
delivered = message is null || await notifier.DeliverPushAsync(message);
}