feat: publish dbussmsforward refactor
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using DbusSmsForward.ProcessSmsContent;
|
||||
using DbusSmsForward.SMSModel;
|
||||
using DbusSmsForward.SettingModel;
|
||||
|
||||
namespace DbusSmsForward.Services;
|
||||
|
||||
public static class NotificationContentBuilder
|
||||
{
|
||||
public static string BuildBody(SmsContentModel sms, string deviceName)
|
||||
=> $"发信电话:{sms.TelNumber}\n时间:{sms.SmsDate}\n转发设备:{deviceName}\n短信内容:{sms.SmsContent}";
|
||||
|
||||
public static SmsCodeModel ExtractCode(DbusSmsForwardOptions options, SmsContentModel sms)
|
||||
{
|
||||
if (!options.Forwarding.EnableSmsCodeExtraction)
|
||||
{
|
||||
return new SmsCodeModel();
|
||||
}
|
||||
|
||||
return GetSmsContentCode.GetSmsCodeModel(sms.SmsContent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user