This commit is contained in:
@@ -39,6 +39,7 @@ namespace AyaNova.Biz
|
||||
//temporary list to hold translations as required during delivery
|
||||
private static Dictionary<long, List<NameIdItem>> _transCache = new Dictionary<long, List<NameIdItem>>();
|
||||
private static Dictionary<long, long> _UserTranslationIdCache = new Dictionary<long, long>();
|
||||
private static Dictionary<long, string> _ServerTheWordTranslations = new Dictionary<long, string>();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// DoSweep
|
||||
@@ -117,6 +118,8 @@ namespace AyaNova.Biz
|
||||
_UserTranslationIdCache.Add(userid, transId);
|
||||
await CacheNotifyEventTypeTranslations(transId);
|
||||
}
|
||||
//cache all translations of the word "Server" for server notifications
|
||||
_ServerTheWordTranslations = await TranslationBiz.GetAllTranslationsForKey("Server");
|
||||
|
||||
//iterate and deliver
|
||||
foreach (var notifyevent in events)
|
||||
@@ -209,7 +212,12 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
var transid = _UserTranslationIdCache[ne.NotifySubscription.UserId];
|
||||
var subject = $"AY:{GetTranslatedNotifyEventName(ne.EventType, transid)}:{ne.Name}";
|
||||
var name = ne.Name;
|
||||
if (name == "~SERVER~")
|
||||
{
|
||||
name = _ServerTheWordTranslations.First(z => z.Key == transid).Value;
|
||||
}
|
||||
var subject = $"AY:{GetTranslatedNotifyEventName(ne.EventType, transid)}:{name}";
|
||||
|
||||
IMailer m = AyaNova.Util.ServiceProviderProvider.Mailer;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user