mailto: links in the FAQ + Webhook notifications for immediately published offers #45
5 changed files with 24 additions and 5 deletions
Send webhook notifications for preconfirmed and prereviewed job offers
- Release fixed version
commit
ab25693f48
6
Cargo.lock
generated
6
Cargo.lock
generated
|
|
@ -739,7 +739,7 @@ checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
|
|||
|
||||
[[package]]
|
||||
name = "better_toml_datetime"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror",
|
||||
|
|
@ -1685,7 +1685,7 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
|
|||
|
||||
[[package]]
|
||||
name = "jobboerse"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
dependencies = [
|
||||
"actix-files",
|
||||
"actix-multipart",
|
||||
|
|
@ -1919,7 +1919,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "multipart_helper"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
dependencies = [
|
||||
"actix-multipart",
|
||||
"futures-util",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
members = [".", "packages/*"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
edition = "2021"
|
||||
rust-version = "1.64"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
|
|
|||
|
|
@ -7,10 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.4.1] (2024-01-02)
|
||||
|
||||
### Fix
|
||||
|
||||
- change e-mail links in the FAQ to `mailto:` links
|
||||
- update the version number in the `PKGBUILD` script
|
||||
- Also send webhook notifications for pre-confirmed pre-reviewed job offers
|
||||
|
||||
## [0.4.0] (2023-12-25)
|
||||
|
||||
|
|
@ -215,6 +218,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Overview Page of Dependency licenses
|
||||
|
||||
[Unreleased]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/main
|
||||
[0.4.1]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.4.1
|
||||
[0.4.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.4.0
|
||||
[0.3.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.3.0
|
||||
[0.2.4]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.2.4
|
||||
[0.2.3]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.2.3
|
||||
|
|
|
|||
BIN
packages/jobboerse/THIRDPARTY.toml
(Stored with Git LFS)
BIN
packages/jobboerse/THIRDPARTY.toml
(Stored with Git LFS)
Binary file not shown.
|
|
@ -29,6 +29,7 @@ use crate::route::job_offer::error::{FormProcessingError, SubmissionResponseErro
|
|||
use crate::route::{HTML_CONTENT, LOGIN_ROUTE};
|
||||
use crate::server_config::ServerConfig;
|
||||
use crate::util::{parse_date, parse_datetime, process_links, process_new_attachments};
|
||||
use crate::webhook::NewOfferWebhookData;
|
||||
use crate::{email, template};
|
||||
use multipart_helper::{multi_field, multi_file, once_field};
|
||||
|
||||
|
|
@ -276,6 +277,19 @@ pub(crate) async fn create_job_offer<'data, 'config>(
|
|||
}
|
||||
}
|
||||
|
||||
if created_offer.is_published() {
|
||||
if let Some(webhook_url) = &config.config.webhook_url {
|
||||
let data = NewOfferWebhookData {
|
||||
title: created_offer.title.to_owned(),
|
||||
company: created_offer.offering_party.to_owned(),
|
||||
link: created_offer.highlight_link(&req)?,
|
||||
};
|
||||
crate::webhook::send_new_offer_message(&hb, webhook_url.to_owned(), &data)
|
||||
.await
|
||||
.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Ok(created_offer)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue