Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
db2dd42
feat: enhance unsubscription management and SMS record handling
wzh425 Jun 24, 2026
22164f1
feat: enhance SMS inbound processing with provider support
wzh425 Jun 25, 2026
b66cbd3
feat: enhance SMS inbound processing with provider support
wzh425 Jun 25, 2026
b94d8d5
feat: enhance SMS unsubscription handling and message processing
wzh425 Jun 27, 2026
e7036ab
feat: enhance unsubscription handling and user identity resolution
wzh425 Jun 27, 2026
0edd33a
refactor: streamline unsubscription timeline and enhance detail handling
wzh425 Jun 27, 2026
075e844
refactor: simplify unsubscription logic and enhance message template …
wzh425 Jun 29, 2026
cb7ac77
feat: enhance message template validation for SMS channel
wzh425 Jun 29, 2026
51aca4b
refactor: update unsubscribe configuration to use template IDs
wzh425 Jun 29, 2026
3258fda
refactor: enhance SMS inbound auto-reply service with message templat…
wzh425 Jun 29, 2026
67604bf
refactor: improve SMS inbound auto-reply logic with enhanced template…
wzh425 Jun 29, 2026
a2d61d1
refactor: update unsubscribe configuration to use GUIDs for auto-repl…
wzh425 Jun 29, 2026
7a4c531
refactor: enhance message receipt filtering by ensuring success status
wzh425 Jun 30, 2026
7778290
refactor: enhance SMS inbound auto-reply service with production chec…
wzh425 Jun 30, 2026
03b5bc9
chore: update launch settings for development environment
wzh425 Jun 30, 2026
9c0af06
refactor: clean up unused using directives in SendSimpleMessageEventH…
wzh425 Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,7 @@ MigrationBackup/

.idea/
.DS_Store

# Cursor local guidance (do not commit)
.cursor/rules/
.cursor/skills/
36 changes: 0 additions & 36 deletions Masa.Mc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "components", "components",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Service.Admin", "src\Services\Masa.Mc.Service\Masa.Mc.Service.Admin.csproj", "{87A8E21E-DF58-4BEA-8EA1-EF333BE4D2B3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web", "Web", "{F3986DD3-0372-4929-B72A-09D93196541E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Web.Admin", "src\Web\Masa.Mc.Web.Admin\Masa.Mc.Web.Admin.csproj", "{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{32774681-0D67-48A6-A379-D57015094F85}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.ApiGateways.Caller", "src\ApiGateways\Caller\Masa.Mc.ApiGateways.Caller\Masa.Mc.ApiGateways.Caller.csproj", "{40685EC0-64DF-4742-B8F6-602AFAEFC0EA}"
Expand All @@ -37,10 +33,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Infrastructure.Ddd.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Infrastructure.EntityFrameworkCore", "src\Infrastructure\Masa.Mc.Infrastructure.EntityFrameworkCore\Masa.Mc.Infrastructure.EntityFrameworkCore.csproj", "{FAFDC558-45A7-4FF7-BFCE-015EDF58F3AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Web.Admin.Server", "src\Web\Masa.Mc.Web.Admin.Server\Masa.Mc.Web.Admin.Server.csproj", "{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Web.Admin.WebAssembly", "src\Web\Masa.Mc.Web.Admin.WebAssembly\Masa.Mc.Web.Admin.WebAssembly.csproj", "{1644695E-4B4F-4D7D-833C-7E694E758641}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Infrastructure.Common", "src\Infrastructure\Masa.Mc.Infrastructure.Common\Masa.Mc.Infrastructure.Common.csproj", "{4024A9CA-D6CA-44D7-BEA4-D96891AFC6DD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Mc.Infrastructure.Sms", "src\Infrastructure\Masa.Mc.Infrastructure.Sms\Masa.Mc.Infrastructure.Sms.csproj", "{D965E2A5-3B97-4903-8FF6-E2E08847F16F}"
Expand Down Expand Up @@ -97,14 +89,6 @@ Global
{87A8E21E-DF58-4BEA-8EA1-EF333BE4D2B3}.Release|Any CPU.Build.0 = Release|Any CPU
{87A8E21E-DF58-4BEA-8EA1-EF333BE4D2B3}.Release|x86.ActiveCfg = Release|Any CPU
{87A8E21E-DF58-4BEA-8EA1-EF333BE4D2B3}.Release|x86.Build.0 = Release|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Debug|x86.Build.0 = Debug|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Release|Any CPU.Build.0 = Release|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Release|x86.ActiveCfg = Release|Any CPU
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7}.Release|x86.Build.0 = Release|Any CPU
{40685EC0-64DF-4742-B8F6-602AFAEFC0EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40685EC0-64DF-4742-B8F6-602AFAEFC0EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40685EC0-64DF-4742-B8F6-602AFAEFC0EA}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -145,22 +129,6 @@ Global
{FAFDC558-45A7-4FF7-BFCE-015EDF58F3AE}.Release|Any CPU.Build.0 = Release|Any CPU
{FAFDC558-45A7-4FF7-BFCE-015EDF58F3AE}.Release|x86.ActiveCfg = Release|Any CPU
{FAFDC558-45A7-4FF7-BFCE-015EDF58F3AE}.Release|x86.Build.0 = Release|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Debug|x86.Build.0 = Debug|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Release|Any CPU.Build.0 = Release|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Release|x86.ActiveCfg = Release|Any CPU
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2}.Release|x86.Build.0 = Release|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Debug|x86.ActiveCfg = Debug|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Debug|x86.Build.0 = Debug|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Release|Any CPU.Build.0 = Release|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Release|x86.ActiveCfg = Release|Any CPU
{1644695E-4B4F-4D7D-833C-7E694E758641}.Release|x86.Build.0 = Release|Any CPU
{4024A9CA-D6CA-44D7-BEA4-D96891AFC6DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4024A9CA-D6CA-44D7-BEA4-D96891AFC6DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4024A9CA-D6CA-44D7-BEA4-D96891AFC6DD}.Debug|x86.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -297,8 +265,6 @@ Global
{4A1D2DFA-D091-4CD2-B9CB-D7AAA795ABD9} = {92F40AFA-8416-40BE-9893-D35E1924C69D}
{FBFB499A-7022-4417-881B-68F63DBDB7F4} = {E011B243-0389-468B-B903-83445BED69A4}
{87A8E21E-DF58-4BEA-8EA1-EF333BE4D2B3} = {4A1D2DFA-D091-4CD2-B9CB-D7AAA795ABD9}
{F3986DD3-0372-4929-B72A-09D93196541E} = {92F40AFA-8416-40BE-9893-D35E1924C69D}
{3F0181CA-BDF5-4F56-A664-0E82DFD2A8C7} = {F3986DD3-0372-4929-B72A-09D93196541E}
{32774681-0D67-48A6-A379-D57015094F85} = {92F40AFA-8416-40BE-9893-D35E1924C69D}
{40685EC0-64DF-4742-B8F6-602AFAEFC0EA} = {32774681-0D67-48A6-A379-D57015094F85}
{88AD0A79-5286-4C1C-8A58-AAC9E6870CCD} = {92F40AFA-8416-40BE-9893-D35E1924C69D}
Expand All @@ -307,8 +273,6 @@ Global
{C47B7220-BDF3-4DFA-93FE-0F6885DB89A4} = {4660010F-BB9B-4C8E-B4F7-34AF77080EA0}
{6CAC62DA-A3AF-4BFE-8E1C-0DB9D0D81CD6} = {4660010F-BB9B-4C8E-B4F7-34AF77080EA0}
{FAFDC558-45A7-4FF7-BFCE-015EDF58F3AE} = {4660010F-BB9B-4C8E-B4F7-34AF77080EA0}
{8FA1D09B-F5B5-4B42-BF86-53512F1377B2} = {F3986DD3-0372-4929-B72A-09D93196541E}
{1644695E-4B4F-4D7D-833C-7E694E758641} = {F3986DD3-0372-4929-B72A-09D93196541E}
{4024A9CA-D6CA-44D7-BEA4-D96891AFC6DD} = {4660010F-BB9B-4C8E-B4F7-34AF77080EA0}
{D965E2A5-3B97-4903-8FF6-E2E08847F16F} = {4660010F-BB9B-4C8E-B4F7-34AF77080EA0}
{C816B922-18A4-4F6A-9A7A-4D0E7F2AE129} = {4660010F-BB9B-4C8E-B4F7-34AF77080EA0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

public class GetSmsInboundInputDto : PaginatedOptionsDto
{
public Guid ChannelId { get; set; }
public Guid? ChannelId { get; set; }

public string ChannelCode { get; set; } = string.Empty;

public SmsInboundProviders? Provider { get; set; }

public string Mobile { get; set; } = string.Empty;

Expand All @@ -21,10 +25,12 @@
{
}

public GetSmsInboundInputDto(Guid channelId, string mobile, string addSerial, string smsContent, DateTimeOffset? startTime, DateTimeOffset? endTime, string sorting, int page, int pageSize)
public GetSmsInboundInputDto(Guid? channelId, string channelCode, SmsInboundProviders? provider, string mobile, string addSerial, string smsContent, DateTimeOffset? startTime, DateTimeOffset? endTime, string sorting, int page, int pageSize)

Check warning on line 28 in src/Contracts/Masa.Mc.Contracts.Admin/Dtos/MessageReceipts/GetSmsInboundInputDto.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Constructor has 8 new parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=masastack_MASA.MC&issues=AZ8WggPXrfnJEG5DMMfv&open=AZ8WggPXrfnJEG5DMMfv&pullRequest=673
: base(sorting, page, pageSize)
{
ChannelId = channelId;
ChannelCode = channelCode;
Provider = provider;
Mobile = mobile;
AddSerial = addSerial;
SmsContent = smsContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ public class SmsInboundDto : AuditEntityDto<Guid, Guid>
public string AddSerial { get; set; } = string.Empty;

public SmsInboundProviders Provider { get; set; }

public SmsInboundTypes InboundType { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Contracts.Admin.Dtos.MessageRecords;

public class GetSmsInteractionHistoryInputDto
{
public string Mobile { get; set; } = string.Empty;

public Guid ChannelId { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Contracts.Admin.Dtos.MessageRecords;

public class SmsInteractionHistoryDto
{
public DateTimeOffset SendTime { get; set; }

public string Content { get; set; } = string.Empty;

public bool IsInbound { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Contracts.Admin.Dtos.MessageRecords;

public class SmsRecordDto
{
public Guid ChannelId { get; set; }

public string SmsContent { get; set; } = string.Empty;

public DateTimeOffset? SendTime { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ public class MessageTemplateUnsubscribeConfigDto

public string UnsubscribeKeyword { get; set; } = string.Empty;

public string UnsubscribeAutoReply { get; set; } = string.Empty;
public Guid UnsubscribeAutoReplyTemplateId { get; set; }

public string ResubscribeKeyword { get; set; } = string.Empty;

public string ResubscribeAutoReply { get; set; } = string.Empty;

public bool DebounceEnabled { get; set; }

public int CooldownSeconds { get; set; }
public Guid ResubscribeAutoReplyTemplateId { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ public class MessageTemplateUpsertDtoValidator : AbstractValidator<MessageTempla
public MessageTemplateUpsertDtoValidator()
{
RuleFor(inputDto => inputDto.DisplayName).Required("MessageTemplateDisplayNameRequired")
.Length(2, 50).WithMessage("MessageTemplateDisplayNameLength").When(x => x.ChannelType != ChannelTypes.WeixinWork && x.TemplateType != (int)WeixinWorkTemplateTypes.Text);
.Length(2, 100).WithMessage("MessageTemplateDisplayNameLength").When(x => x.ChannelType != ChannelTypes.WeixinWork && x.TemplateType != (int)WeixinWorkTemplateTypes.Text);
RuleFor(inputDto => inputDto.Code).Required("MessageTemplateCodeRequired")
.LetterNumberSymbol().WithMessage("MessageTemplateCodeLetterNumberSymbol")
.Length(2, 50).WithMessage("MessageTemplateCodeLength");
RuleFor(inputDto => inputDto.ChannelId).Required("ChannelIdRequired");
RuleFor(inputDto => inputDto.Status).IsInEnum().WithMessage("MessageTemplateStatusRequired");
RuleFor(inputDto => inputDto.TemplateType)
.Must(templateType => System.Enum.IsDefined(typeof(SmsTemplateTypes), templateType))
.When(inputDto => inputDto.ChannelType == ChannelTypes.Sms)
.WithMessage("MessageTemplateTemplateTypeRequired");
RuleFor(inputDto => inputDto.AuditStatus).IsInEnum();
RuleFor(inputDto => inputDto.PerDayLimit).InclusiveBetween(0, 500).WithMessage("MessageTemplatePerDayLimitBetween");
RuleFor(inputDto => inputDto.Title).Required("TitleRequired")
.Length(2, 50).WithMessage("TitleLength")
.Length(2, 100).WithMessage("TitleLength")
.When(x => x.ChannelType == ChannelTypes.Email || x.ChannelType == ChannelTypes.WebsiteMessage);
RuleFor(inputDto => inputDto.Content).Required("ContentRequired");
RuleFor(inputDto => inputDto.JumpUrl).Required("JumpUrlRequired").When(x => x.IsJump);
Expand All @@ -27,18 +31,17 @@ public MessageTemplateUpsertDtoValidator()
RuleFor(inputDto => inputDto.UnsubscribeConfig.UnsubscribeKeyword).Required("UnsubscribeKeywordRequired")
.Length(1, 20).WithMessage("UnsubscribeKeywordLength")
.When(x => x.UnsubscribeConfig.Enabled);
RuleFor(inputDto => inputDto.UnsubscribeConfig.UnsubscribeAutoReply).Required("UnsubscribeAutoReplyRequired")
.Length(1, 500).WithMessage("UnsubscribeAutoReplyLength")
RuleFor(inputDto => inputDto.UnsubscribeConfig.UnsubscribeAutoReplyTemplateId)
.Must(templateId => templateId != Guid.Empty)
.WithMessage("UnsubscribeAutoReplyRequired")
.When(x => x.UnsubscribeConfig.Enabled);
RuleFor(inputDto => inputDto.UnsubscribeConfig.ResubscribeKeyword).Required("ResubscribeKeywordRequired")
.Length(1, 20).WithMessage("ResubscribeKeywordLength")
.When(x => x.UnsubscribeConfig.Enabled);
RuleFor(inputDto => inputDto.UnsubscribeConfig.ResubscribeAutoReply).Required("ResubscribeAutoReplyRequired")
.Length(1, 500).WithMessage("ResubscribeAutoReplyLength")
RuleFor(inputDto => inputDto.UnsubscribeConfig.ResubscribeAutoReplyTemplateId)
.Must(templateId => templateId != Guid.Empty)
.WithMessage("ResubscribeAutoReplyRequired")
.When(x => x.UnsubscribeConfig.Enabled);
RuleFor(inputDto => inputDto.UnsubscribeConfig.CooldownSeconds)
.GreaterThan(0).WithMessage("UnsubscribeCooldownSecondsRequired")
.When(x => x.UnsubscribeConfig.Enabled && x.UnsubscribeConfig.DebounceEnabled);
RuleFor(inputDto => inputDto).Must(inputDto =>
!inputDto.UnsubscribeConfig.Enabled ||
!string.Equals(inputDto.UnsubscribeConfig.UnsubscribeKeyword?.Trim(), inputDto.UnsubscribeConfig.ResubscribeKeyword?.Trim(), StringComparison.OrdinalIgnoreCase))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Contracts.Admin.Dtos.Unsubscriptions;

public class AddChannelUserIdentityToUnsubscriptionBlacklistInputDto
{
public Guid? UserId { get; set; }

public string ChannelCode { get; set; } = string.Empty;

public string ChannelUserIdentity { get; set; } = string.Empty;

public string TemplateCode { get; set; } = string.Empty;

public string Reason { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Contracts.Admin.Dtos.Unsubscriptions;

public class ChannelUserIdentityUnsubscriptionItemDto
{
public string ChannelUserIdentity { get; set; } = string.Empty;

public Guid? TemplateId { get; set; }

public string TemplateCode { get; set; } = string.Empty;

public string TemplateName { get; set; } = string.Empty;

public string TemplateContent { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Contracts.Admin.Dtos.Unsubscriptions;

public class RemoveChannelUserIdentityFromUnsubscriptionBlacklistInputDto
{
public string ChannelCode { get; set; } = string.Empty;

public string ChannelUserIdentity { get; set; } = string.Empty;

public string TemplateCode { get; set; } = string.Empty;

public string Reason { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,7 @@ public class UnsubscriptionTimelineDto

public UnsubscriptionTimelineActions Action { get; set; }

public UnsubscriptionSource Source { get; set; }

public string Detail { get; set; } = string.Empty;

public string Keyword { get; set; } = string.Empty;

public string MessageId { get; set; } = string.Empty;

public Guid? MatchedMessageRecordId { get; set; }

public string MatchedMessageSnapshot { get; set; } = string.Empty;

public DateTimeOffset? MatchedMessageSentAt { get; set; }

public DateTimeOffset OccurredAt { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,19 @@ namespace Masa.Mc.Domain.Shared.MessageReceipts;
public static class SmsInboundReservedKeywords
{
public const string YunMasUnsubscribeKeyword = "R";

public static bool IsProviderUnsubscribeKeyword(SmsInboundProviders provider, string inboundKeyword)
{
if (string.IsNullOrWhiteSpace(inboundKeyword))
{
return false;
}

var normalizedKeyword = inboundKeyword.Trim();
return provider switch
{
SmsInboundProviders.YunMas => string.Equals(normalizedKeyword, YunMasUnsubscribeKeyword, StringComparison.OrdinalIgnoreCase),
_ => false
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Mc.Domain.Shared.MessageReceipts;

public enum SmsInboundTypes
{
Other = 0,
Unsubscribe = 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public enum SmsTemplateTypes
Notification = 2,
Promotion = 3,
International = 4,
Digital=5,
Digital = 5,
Unsubscribe = 101,
Resubscribe = 102,
Other = 99
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public enum UnsubscriptionTimelineActions
InboundUnsubscribed = 1,
ManualUnsubscribed,
ManualResubscribed,
AutoResubscribed
AutoResubscribed,
OutboundMessageSent
}
5 changes: 2 additions & 3 deletions src/Domain/Masa.Mc.Domain/Channels/Aggregates/ChannelType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public virtual SendMessageEvent GetSendMessageEvent(Guid channelId, MessageData
throw new NotImplementedException();
}

public virtual SendSimpleMessageEvent GetSendSimpleMessageEvent(string channelUserIdentity, string channelCode, MessageData messageData, ExtraPropertyDictionary variables, ExtraPropertyDictionary originalVariables, string systemId)
public virtual SendSimpleMessageEvent GetSendSimpleMessageEvent(string channelUserIdentity, string channelCode, MessageData messageData, ExtraPropertyDictionary variables, string systemId)
{
throw new NotImplementedException();
}
Expand All @@ -52,12 +52,11 @@ public override SendMessageEvent GetSendMessageEvent(Guid channelId, MessageData
return new SendSmsMessageEvent(channelId, messageData, messageTaskHistory);
}

public override SendSimpleMessageEvent GetSendSimpleMessageEvent(string channelUserIdentity, string channelCode, MessageData messageData, ExtraPropertyDictionary variables, ExtraPropertyDictionary originalVariables, string systemId)
public override SendSimpleMessageEvent GetSendSimpleMessageEvent(string channelUserIdentity, string channelCode, MessageData messageData, ExtraPropertyDictionary variables, string systemId)
{
return new SendSimpleSmsMessageEvent(channelUserIdentity, channelCode, messageData)
{
Variables = variables,
OriginalVariables = originalVariables,
SystemId = systemId
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ public static class MessageTemplateExceptionCodes
{
public const string VERIFICATION_CODE_TEMPLATE_CANNOT_ENABLE_UNSUBSCRIBE = "VerificationCodeTemplateCannotEnableUnsubscribe";
public const string UNSUBSCRIBE_KEYWORD_REQUIRED = "UnsubscribeKeywordRequired";
public const string UNSUBSCRIBE_AUTO_REPLY_REQUIRED = "UnsubscribeAutoReplyRequired";
public const string RESUBSCRIBE_KEYWORD_REQUIRED = "ResubscribeKeywordRequired";
public const string RESUBSCRIBE_AUTO_REPLY_REQUIRED = "ResubscribeAutoReplyRequired";
public const string UNSUBSCRIBE_KEYWORDS_MUST_BE_DIFFERENT = "UnsubscribeKeywordsMustBeDifferent";
public const string UNSUBSCRIBE_COOLDOWN_SECONDS_REQUIRED = "UnsubscribeCooldownSecondsRequired";
}
Loading
Loading