feat: Send push notifications for dm call start/end

This commit is contained in:
IAmTomahawkx
2025-09-06 15:14:48 -07:00
parent d03e6be2eb
commit 77a23239ea
21 changed files with 568 additions and 80 deletions

View File

@@ -7,7 +7,6 @@ use futures::future::join_all;
use iso8601_timestamp::Timestamp;
use once_cell::sync::Lazy;
use rand::seq::SliceRandom;
use redis_kiss::{get_connection, AsyncCommands};
use revolt_config::{config, FeaturesLimits};
use revolt_models::v0::{self, UserBadges, UserFlags};
use revolt_presence::filter_online;
@@ -640,19 +639,6 @@ impl User {
}
}
/// Gets current voice channel
///
/// current_context: Either the channel id if a dm or group, or server_id if in a server
pub async fn current_voice_channel(&self, current_context: &str) -> Result<Option<String>> {
let mut conn = get_connection()
.await
.map_err(|_| create_error!(InternalError))?;
conn.get::<_, Option<String>>(format!("vc-{}-{current_context}", &self.id))
.await
.map_err(|_| create_error!(InternalError))
}
/// Update user data
pub async fn update(
&mut self,