You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Horde: Add additional logging for Slack message updates.
#preflight none [CL 21747823 by Ben Marsh in ue5-main branch]
This commit is contained in:
+15
-1
@@ -293,6 +293,15 @@ namespace Horde.Build.Notifications.Sinks
|
||||
}
|
||||
|
||||
MessageStateDocument state = await _messageStates.FindOneAndUpdateAsync(filter, update, new FindOneAndUpdateOptions<MessageStateDocument> { IsUpsert = true, ReturnDocument = ReturnDocument.After });
|
||||
if (state.Id == newId)
|
||||
{
|
||||
_logger.LogInformation("Posted message {Ts} (recipient: {Recipient}, user: {UserId}), event: {EventId}, digest: {Digest})", state.Ts, recipient, userId ?? UserId.Empty, eventId, digest);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogInformation("Updated message {Ts} (recipient: {Recipient}, user: {UserId}), event: {EventId}, digest: {Digest})", state.Ts, recipient, userId ?? UserId.Empty, eventId, digest);
|
||||
}
|
||||
|
||||
return (state, state.Id == newId);
|
||||
}
|
||||
|
||||
@@ -1259,7 +1268,7 @@ namespace Horde.Build.Notifications.Sinks
|
||||
|
||||
if (IsRecipientAllowed(recipient, "issue update"))
|
||||
{
|
||||
await SendOrUpdateMessageAsync(recipient, GetIssueEventId(issue), userId, attachment);
|
||||
await SendOrUpdateMessageAsync(recipient, GetIssueEventId(issue, recipient), userId, attachment);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1268,6 +1277,11 @@ namespace Horde.Build.Notifications.Sinks
|
||||
return $"issue_{issue.Id}";
|
||||
}
|
||||
|
||||
static string GetIssueEventId(IIssue issue, string recipient)
|
||||
{
|
||||
return $"issue_{issue.Id}_for_{recipient}";
|
||||
}
|
||||
|
||||
async Task<string> FormatNameAsync(UserId userId)
|
||||
{
|
||||
IUser? user = await _userCollection.GetUserAsync(userId);
|
||||
|
||||
Reference in New Issue
Block a user