try fix dailynote notification user sync

This commit is contained in:
Lightczx
2023-08-25 11:36:07 +08:00
parent b7642847cd
commit c1cc4961a0

View File

@@ -46,14 +46,21 @@ internal sealed partial class DailyNoteNotificationOperation
string? attribution = SH.ServiceDailyNoteNotifierAttribution; string? attribution = SH.ServiceDailyNoteNotifierAttribution;
Response<ListWrapper<UserGameRole>> rolesResponse = await bindingClient if (entry.UserGameRole is not null)
.GetUserGameRolesOverseaAwareAsync(entry.User)
.ConfigureAwait(false);
if (rolesResponse.IsOk())
{ {
List<UserGameRole> roles = rolesResponse.Data.List; attribution = entry.UserGameRole.ToString();
attribution = roles.SingleOrDefault(r => r.GameUid == entry.Uid)?.ToString() ?? ToastAttributionUnknown; }
else
{
Response<ListWrapper<UserGameRole>> rolesResponse = await bindingClient
.GetUserGameRolesOverseaAwareAsync(entry.User)
.ConfigureAwait(false);
if (rolesResponse.IsOk())
{
List<UserGameRole> roles = rolesResponse.Data.List;
attribution = roles.SingleOrDefault(r => r.GameUid == entry.Uid)?.ToString() ?? ToastAttributionUnknown;
}
} }
ToastContentBuilder builder = new ToastContentBuilder() ToastContentBuilder builder = new ToastContentBuilder()