Skip to content

Commit

Permalink
Fix deserialisation failure of audit logs when the user ID is absent
Browse files Browse the repository at this point in the history
Kind of fixes serenity-rs#2929. Real fix would be to account for this at the type
level with `Option<T>`, but this change cannot be committed to `current`
as it is a breaking change.
  • Loading branch information
arqunis committed Aug 5, 2024
1 parent 658b6a7 commit 6092927
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/model/guild/audit_log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ pub struct AuditLogEntry {
pub action: Action,
/// What was the reasoning by doing an action on a target? If there was one.
pub reason: Option<String>,
// FIXME: Remove this attribute and change the type to `Option<UserId>` on `next`.
#[serde(default)]
/// The user that did this action on a target.
pub user_id: UserId,
/// What changes were made.
Expand Down

0 comments on commit 6092927

Please sign in to comment.