Compare commits
4
Commits
20230603-1
...
20230603-3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c834d06d4 | ||
|
|
f5e6086d2a | ||
|
|
3365a8e482 | ||
|
|
268c2d1355 |
@@ -105,7 +105,7 @@ mod tests {
|
||||
|
||||
let fetched_strike = strikes
|
||||
.into_iter()
|
||||
.find(|strike| strike.id == strike.id)
|
||||
.find(|entry| entry.id == strike.id)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(fetched_strike, updated_strike);
|
||||
|
||||
@@ -8,6 +8,8 @@ extern crate serde_json;
|
||||
pub mod routes;
|
||||
pub mod util;
|
||||
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
use async_std::channel::unbounded;
|
||||
use revolt_quark::authifier::{Authifier, AuthifierEvent};
|
||||
use revolt_quark::events::client::EventV1;
|
||||
@@ -74,8 +76,8 @@ async fn rocket() -> _ {
|
||||
.attach(revolt_quark::web::ratelimiter::RatelimitFairing)
|
||||
.attach(cors)
|
||||
.configure(rocket::Config {
|
||||
limits: rocket::data::Limits::default()
|
||||
.limit("string", 5.megabytes()),
|
||||
limits: rocket::data::Limits::default().limit("string", 5.megabytes()),
|
||||
address: Ipv4Addr::new(0, 0, 0, 0).into(),
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -495,16 +495,6 @@ impl Channel {
|
||||
.replace(replies.into_iter().collect::<Vec<String>>());
|
||||
}
|
||||
|
||||
// Process included embeds.
|
||||
let mut embeds = vec![];
|
||||
for sendable_embed in data.embeds {
|
||||
embeds.push(sendable_embed.into_embed(db, message_id.clone()).await?)
|
||||
}
|
||||
|
||||
if !embeds.is_empty() {
|
||||
message.embeds.replace(embeds);
|
||||
}
|
||||
|
||||
// Add attachments to message.
|
||||
let mut attachments = vec![];
|
||||
if data.attachments.len() > *MAX_ATTACHMENT_COUNT {
|
||||
@@ -524,6 +514,16 @@ impl Channel {
|
||||
message.attachments.replace(attachments);
|
||||
}
|
||||
|
||||
// Process included embeds.
|
||||
let mut embeds = vec![];
|
||||
for sendable_embed in data.embeds {
|
||||
embeds.push(sendable_embed.into_embed(db, message_id.clone()).await?)
|
||||
}
|
||||
|
||||
if !embeds.is_empty() {
|
||||
message.embeds.replace(embeds);
|
||||
}
|
||||
|
||||
// Set content
|
||||
message.content = data.content;
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ pub struct DataMessageSend {
|
||||
///
|
||||
/// Text embed content contributes to the content length cap
|
||||
#[serde(default)]
|
||||
#[validate(length(min = 1, max = 10))]
|
||||
#[validate(length(min = 0, max = 10))]
|
||||
pub embeds: Vec<SendableEmbed>,
|
||||
/// Masquerade to apply to this message
|
||||
#[validate]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
publish:
|
||||
cargo publish --package revolt-result
|
||||
cargo publish --package revolt-permissions
|
||||
cargo publish --package revolt-database
|
||||
cargo publish --package revolt-presence
|
||||
cargo publish --package revolt-models
|
||||
cargo publish --package revolt-presence
|
||||
cargo publish --package revolt-database
|
||||
|
||||
Reference in New Issue
Block a user