mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Remove ChannelRef, use the full Channel object.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::guards::channel::ChannelRef;
|
||||
use crate::database::channel::Channel;
|
||||
|
||||
use once_cell::sync::OnceCell;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
@@ -65,7 +65,7 @@ pub fn send_message_threaded<U: Into<Option<Vec<String>>>, G: Into<Option<String
|
||||
}
|
||||
}
|
||||
|
||||
pub fn send_message_given_channel(data: events::Notification, channel: &ChannelRef) {
|
||||
pub fn send_message_given_channel(data: events::Notification, channel: &Channel) {
|
||||
match channel.channel_type {
|
||||
0..=1 => send_message_threaded(channel.recipients.clone(), None, data),
|
||||
2 => send_message_threaded(None, channel.guild.clone(), data),
|
||||
|
||||
Reference in New Issue
Block a user