forked from jmug/stoatchat
Remove old notif code; uncommited changes.
This commit is contained in:
@@ -170,7 +170,7 @@ impl<'r> FromParam<'r> for Channel {
|
||||
}
|
||||
}
|
||||
|
||||
use crate::notifications::events::Notification;
|
||||
/*use crate::notifications::events::Notification;
|
||||
|
||||
pub fn process_event(event: &Notification) {
|
||||
match event {
|
||||
@@ -212,4 +212,4 @@ pub fn process_event(event: &Notification) {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@@ -306,7 +306,7 @@ pub fn get_invite<U: Into<Option<String>>>(
|
||||
}
|
||||
}
|
||||
|
||||
use crate::notifications::events::Notification;
|
||||
/*use crate::notifications::events::Notification;
|
||||
|
||||
pub fn process_event(event: &Notification) {
|
||||
match event {
|
||||
@@ -335,4 +335,4 @@ pub fn process_event(event: &Notification) {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
use super::get_collection;
|
||||
use crate::database::channel::Channel;
|
||||
use crate::notifications;
|
||||
use crate::notifications::events::message::Create;
|
||||
use crate::notifications::events::Notification;
|
||||
use crate::pubsub::hive;
|
||||
use crate::routes::channel::ChannelType;
|
||||
|
||||
@@ -43,7 +40,7 @@ impl Message {
|
||||
.insert_one(to_bson(&self).unwrap().as_document().unwrap().clone(), None)
|
||||
.is_ok()
|
||||
{
|
||||
notifications::send_message_given_channel(
|
||||
/*notifications::send_message_given_channel(
|
||||
Notification::message_create(Create {
|
||||
id: self.id.clone(),
|
||||
nonce: self.nonce.clone(),
|
||||
@@ -52,7 +49,7 @@ impl Message {
|
||||
content: self.content.clone(),
|
||||
}),
|
||||
&target,
|
||||
);
|
||||
);*/
|
||||
|
||||
if hive::publish(
|
||||
&target.id,
|
||||
|
||||
@@ -272,9 +272,7 @@ impl<'r> FromParam<'r> for User {
|
||||
}
|
||||
}
|
||||
|
||||
use crate::notifications::events::Notification;
|
||||
|
||||
pub fn process_event(event: &Notification) {
|
||||
/*pub fn process_event(event: &Notification) {
|
||||
match event {
|
||||
Notification::user_friend_status(ev) => {
|
||||
let mut cache = CACHE.lock().unwrap();
|
||||
@@ -297,4 +295,4 @@ pub fn process_event(event: &Notification) {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user