Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add max length to TargetNotifiers #6544

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Abp/Notifications/NotificationInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class NotificationInfo : CreationAuditedEntity<Guid>
/// </summary>
public const int MaxTenantIdsLength = 128 * 1024;

public const int MaxTargetNotifiersLength = 1024;

/// <summary>
/// Notification target list separation character.
/// </summary>
Expand Down Expand Up @@ -149,6 +151,7 @@ public class NotificationInfo : CreationAuditedEntity<Guid>
/// <summary>
/// which realtime notifiers should handle this notification
/// </summary>
[StringLength(MaxTargetNotifiersLength)]
public virtual string TargetNotifiers { get; set; }

[NotMapped]
Expand Down
3 changes: 3 additions & 0 deletions src/Abp/Notifications/UserNotificationInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace Abp.Notifications
[Table("AbpUserNotifications")]
public class UserNotificationInfo : Entity<Guid>, IHasCreationTime, IMayHaveTenant
{
public const int MaxTargetNotifiersLength = 1024;

/// <summary>
/// Tenant Id.
/// </summary>
Expand All @@ -43,6 +45,7 @@ public class UserNotificationInfo : Entity<Guid>, IHasCreationTime, IMayHaveTena
/// <summary>
/// which realtime notifiers should handle this notification
/// </summary>
[StringLength(MaxTargetNotifiersLength)]
public virtual string TargetNotifiers { get; set; }

[NotMapped]
Expand Down