Merge remote-tracking branch 'origin/main' into livekit
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-models"
|
||||
version = "0.8.4"
|
||||
version = "0.8.7"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -20,8 +20,8 @@ default = ["serde", "partials", "rocket"]
|
||||
|
||||
[dependencies]
|
||||
# Core
|
||||
revolt-config = { version = "0.8.4", path = "../config" }
|
||||
revolt-permissions = { version = "0.8.4", path = "../permissions" }
|
||||
revolt-config = { version = "0.8.7", path = "../config" }
|
||||
revolt-permissions = { version = "0.8.7", path = "../permissions" }
|
||||
|
||||
# Utility
|
||||
regex = "1.11"
|
||||
|
||||
@@ -401,7 +401,7 @@ impl Interactions {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> MessageAuthor<'a> {
|
||||
impl MessageAuthor<'_> {
|
||||
pub fn id(&self) -> &str {
|
||||
match self {
|
||||
MessageAuthor::User(user) => &user.id,
|
||||
|
||||
@@ -7,6 +7,7 @@ mod embeds;
|
||||
mod emojis;
|
||||
mod files;
|
||||
mod messages;
|
||||
mod policy_changes;
|
||||
mod safety_reports;
|
||||
mod server_bans;
|
||||
mod server_members;
|
||||
@@ -23,6 +24,7 @@ pub use embeds::*;
|
||||
pub use emojis::*;
|
||||
pub use files::*;
|
||||
pub use messages::*;
|
||||
pub use policy_changes::*;
|
||||
pub use safety_reports::*;
|
||||
pub use server_bans::*;
|
||||
pub use server_members::*;
|
||||
|
||||
16
crates/core/models/src/v0/policy_changes.rs
Normal file
16
crates/core/models/src/v0/policy_changes.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use iso8601_timestamp::Timestamp;
|
||||
|
||||
auto_derived!(
|
||||
/// Platform policy change
|
||||
pub struct PolicyChange {
|
||||
/// Time at which this policy was created
|
||||
pub created_time: Timestamp,
|
||||
/// Time at which this policy is effective
|
||||
pub effective_time: Timestamp,
|
||||
|
||||
/// Message shown to users
|
||||
pub description: String,
|
||||
/// URL with details about changes
|
||||
pub url: String,
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user