Skip to content

Commit

Permalink
Fix AuditLogEntry::user_id (#2846)
Browse files Browse the repository at this point in the history
This field is documented as nullable but that isn't reflected in the
model. I also took the opportunity to replace the Option<Vec> with a
default Vec.
  • Loading branch information
GnomedDev authored Apr 20, 2024
1 parent 16ec85d commit 92d872a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/model/guild/audit_log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,10 @@ pub struct AuditLogEntry {
/// What was the reasoning by doing an action on a target? If there was one.
pub reason: Option<FixedString>,
/// The user that did this action on a target.
pub user_id: UserId,
pub user_id: Option<UserId>,
/// What changes were made.
pub changes: Option<Vec<Change>>,
#[serde(default)]
pub changes: Vec<Change>,
/// The id of this entry.
pub id: AuditLogEntryId,
/// Some optional data associated with this entry.
Expand Down

0 comments on commit 92d872a

Please sign in to comment.