Every channel needs its own message shape (a WeChat Work template card, a webhook news
article, a wx-pusher URL), but the only way to carry it was to stuff those types into
`NotificationData`, which couples the producer to the channels and forces a schema change
whenever a channel gains a field. Channels now declare their own payload types and the
property bag carries them under per channel key prefixes, so one `ExtraProperties` column
serves every channel and no notification table has to change.
- add the channel data contract to `LINGYUN.Abp.Notifications.Core`:
`NotificationChannelData` base type, `[NotificationChannelData]` /
`[NotificationChannelProperty]` annotations, `NotificationChannelDataDescriptor`,
`NotificationChannelDataFormat` and `NotificationChannelDataPresenceMode`
- add the implementation to `LINGYUN.Abp.Notifications`: `INotificationChannelDataResolver`
dispatching payloads in priority order, `INotificationChannelDataAccessor` reading and
writing typed values in the property bag, `INotificationChannelDataSerializer` for the
producer side, `INotificationChannelDataPresenceProvider`, `AbpNotificationChannelDataOptions`
and `AbpNotificationChannelDataConfigurationException` for registration time validation
- keys are namespaced per channel (`wx-work:`, `wx-work-hook:`, `wx-mp:`, `pusher:`, `plus:`)
and matched case insensitively, so channels cannot collide in the shared property bag;
complex payloads are stored as JSON strings and deserialized back with the configured
`IJsonSerializer`
- the WeChat Work channel gains 18 channel data types plus `WeChatWorkMessageFactory`, and
the webhook channel 16 plus `WeChatWorkWebhookMessageFactory`, covering text, markdown,
markdown_v2, image, news, file, voice, template card, mini program notice and mp news
- PushPlus, WxPusher and the WeChat mini program channel adopt the same contract; the mini
program keys are prefixed and the historical bare keys are kept as a read only fallback,
marked `[Obsolete]` with the provider's `ApplyLegacyKeys` as the only sanctioned read site
- delete the WxPusher `NotificationDataExtensions.SetUrl` in favour of the typed accessor
- add `WebhookTemplateCardSystemTextJsonConverter` so the abstract webhook template card
survives the property bag round trip, and make `WeChatWorkWebhookNewsMessage` public
- test projects `LINGYUN.Abp.Notifications.ChannelData.Tests`, `...PushPlus.Tests`,
`...WeChat.Work.Tests` and `...Webhook.WeChat.Work.Tests` (real ABP container, fake
senders registered through `context.Services.Replace` so no real API is called), the
mini program and wx-pusher tests now drive a fake sender, and each channel verifies
payloads restored from a raw database JSON string as well as from memory
The template card payload is written into the notification property bag as JSON and read
back when the notification is published, but TemplateCard is abstract, so Newtonsoft.Json
could never restore it ("Could not create an instance of type ... abstract class") and the
card was lost as soon as the notification was persisted or queued for a retry.
- add TemplateCardJsonConverter and TemplateCardSystemTextJsonConverter, which resolve the
concrete card from the card_type discriminator (read from the constructor IL, falling back
to the type name) and reject an unknown discriminator
- split NotificationDataWeChatWorkExtensions into partials per message type (file, mini
program, mp news, template card, text card, video, voice) and add the shared
TryGetMessagePayload helper that deserializes with the converter
- add the Safe, EnableIdTrans, EnableDuplicateCheck and DuplicateCheckInterval switches
- migrate TuiJuheNotificationPublishProvider to the NotificationPublishContext contract the
other providers already use, and skip the interceptors for notifications at or above Warn
- bind the WeChat Work mini program account through the new work-weixin/miniprogram/bind
endpoint using the code2session user id
- rename AbpNotificationOptions to AbpNotificationsPublishOptions in the tests, fix the SMS
test project reference, retarget the templating tests to net10.0, register the webhook
notification projects and add the missing IP2Region reference
Give the OAuth login and the mini program login their own WeChat Work grant types instead
of sharing one, and add the code2session exchange the mini program flow needs.
- AbpWeChatWorkGlobalConsts.GrantType becomes OAuthGrantType with the value "wecom_oauth",
and MiniProgramGrantType ("wecom_mp") is added
- WeChatWorkTokenExtensionGrant becomes abstract and exposes a FindUserInfoAsync hook;
WeChatWorkOAuthTokenExtensionGrant keeps the existing user info exchange and the new
WeChatWorkMiniProgramTokenExtensionGrant exchanges the js code through
IWeChatWorkUserFinder.GetCode2SessionAsync
- add the code2session model, response and mapping, plus the
/cgi-bin/miniprogram/jscode2session client call
- register both grant types in AbpOpenIddictWeChatWorkModule and allow both custom flows
in AllowWeChatWorkFlow, and migrate the remaining GrantType call sites
BREAKING CHANGE: AbpWeChatWorkGlobalConsts.GrantType was removed and its value changed, so
clients that authenticate with grant_type "wecom" must switch to "wecom_oauth"; the public
WeChatWorkTokenExtensionGrant is now abstract and must be subclassed.
configureawait.props now provides the ConfigureAwait weaver through the Fody 6.9.3
WeaverConfiguration property and sets FodyGenerateXsd=false, so the per-project
FodyWeavers.xml files and every FodyWeavers.xsd are redundant.
- delete 450 FodyWeavers.xml and 438 FodyWeavers.xsd from the framework, modules,
services, gateways, tests and migrations projects and from the micro service template
- every removed FodyWeavers.xml was equivalent to the default supplied by configureawait.props
(439 x <ConfigureAwait ContinueOnCapturedContext="false" />, 20 x <ConfigureAwait />, whose
default is ContinueOnCapturedContext=false, and 2 of those with an XML declaration); no
Blazor / AspNetCore.Components project carried one and the template manifests do not list them
- the aio template keeps its 22 files: its own Directory.Packages.props pins Fody 6.8.0, which
does not support the WeaverConfiguration property