Remove old notif code; uncommited changes.

This commit is contained in:
Paul Makles
2020-11-28 19:25:15 +00:00
parent c3362a6e4f
commit 5711986768
19 changed files with 70 additions and 737 deletions

View File

@@ -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) {
}
_ => {}
}
}
}*/

View File

@@ -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) {
}
_ => {}
}
}
}*/

View File

@@ -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,

View File

@@ -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) {
}
_ => {}
}
}
}*/