mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Merge pull request #1619 from DGP-Studio/fix/new_dailynote_archon
This commit is contained in:
@@ -54,6 +54,7 @@ internal sealed partial class DailyNoteService : IDailyNoteService, IRecipient<U
|
|||||||
DailyNoteEntry newEntry = DailyNoteEntry.From(userAndUid);
|
DailyNoteEntry newEntry = DailyNoteEntry.From(userAndUid);
|
||||||
|
|
||||||
Web.Response.Response<WebDailyNote> dailyNoteResponse;
|
Web.Response.Response<WebDailyNote> dailyNoteResponse;
|
||||||
|
DailyNoteMetadataContext context;
|
||||||
using (IServiceScope scope = serviceProvider.CreateScope())
|
using (IServiceScope scope = serviceProvider.CreateScope())
|
||||||
{
|
{
|
||||||
IGameRecordClient gameRecordClient = scope.ServiceProvider
|
IGameRecordClient gameRecordClient = scope.ServiceProvider
|
||||||
@@ -63,6 +64,8 @@ internal sealed partial class DailyNoteService : IDailyNoteService, IRecipient<U
|
|||||||
dailyNoteResponse = await gameRecordClient
|
dailyNoteResponse = await gameRecordClient
|
||||||
.GetDailyNoteAsync(userAndUid, token)
|
.GetDailyNoteAsync(userAndUid, token)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
context = await scope.GetRequiredService<IMetadataService>().GetContextAsync<DailyNoteMetadataContext>(token).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dailyNoteResponse.IsOk())
|
if (dailyNoteResponse.IsOk())
|
||||||
@@ -71,6 +74,7 @@ internal sealed partial class DailyNoteService : IDailyNoteService, IRecipient<U
|
|||||||
}
|
}
|
||||||
|
|
||||||
newEntry.UserGameRole = userService.GetUserGameRoleByUid(roleUid);
|
newEntry.UserGameRole = userService.GetUserGameRoleByUid(roleUid);
|
||||||
|
newEntry.ArchonQuestView = DailyNoteArchonQuestView.Create(newEntry.DailyNote, context.Chapters);
|
||||||
await dailyNoteDbService.AddDailyNoteEntryAsync(newEntry, token).ConfigureAwait(false);
|
await dailyNoteDbService.AddDailyNoteEntryAsync(newEntry, token).ConfigureAwait(false);
|
||||||
|
|
||||||
newEntry.User = userAndUid.User;
|
newEntry.User = userAndUid.User;
|
||||||
|
|||||||
Reference in New Issue
Block a user