mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 07:19:22 +00:00
Send a notification when creating a new post
This commit is contained in:
parent
3afc30fb89
commit
919f4184b7
@ -11,8 +11,9 @@ use crate::data::error::{ExecError, ResultBoxError};
|
||||
use crate::data::group::GroupAccessLevel;
|
||||
use crate::data::http_request_handler::HttpRequestHandler;
|
||||
use crate::data::new_survey::NewSurvey;
|
||||
use crate::data::notification::NotifEventType;
|
||||
use crate::data::post::{Post, PostAccessLevel, PostFile, PostKind, PostPageKind, PostVisibilityLevel, PostWebLink};
|
||||
use crate::helpers::{friends_helper, groups_helper, posts_helper, survey_helper, user_helper};
|
||||
use crate::helpers::{friends_helper, groups_helper, notifications_helper, posts_helper, survey_helper, user_helper};
|
||||
use crate::utils::date_utils::time;
|
||||
use crate::utils::string_utils::{check_string_before_insert, check_youtube_id};
|
||||
use crate::utils::user_data_utils::user_data_path;
|
||||
@ -234,7 +235,9 @@ pub fn create_post(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
survey_helper::create(&survey)?;
|
||||
}
|
||||
|
||||
// TODO : create a notification
|
||||
// Create a notification
|
||||
notifications_helper::create_post_notification(r.user_id_ref()?, post_id, NotifEventType::ELEM_CREATED)?;
|
||||
|
||||
r.set_response(ResCreatePost::new(post_id))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user