1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-22 01:15:16 +00:00

Rename fields

This commit is contained in:
2021-04-12 17:59:00 +02:00
parent d6e5cb6fed
commit b28d102e24
5 changed files with 8 additions and 8 deletions

View File

@ -19,4 +19,4 @@ pub mod requests_limit_helper;
pub mod events_helper;
pub mod calls_helper;
pub mod push_notifications_helper;
pub mod independent_push_notification_service_helper;
pub mod independent_push_notifications_service_helper;

View File

@ -4,14 +4,14 @@
use crate::data::user_token::{UserAccessToken, PushNotificationToken};
use crate::data::error::Res;
use crate::helpers::independent_push_notification_service_helper;
use crate::helpers::independent_push_notifications_service_helper;
/// Un-register for previous push notifications service
pub fn un_register_from_previous_service(client: &UserAccessToken) -> Res {
// This method must not fail in case of error
if let PushNotificationToken::INDEPENDENT(old_token) = &client.push_notifications_token {
if let Err(e) = independent_push_notification_service_helper::remove_token(old_token) {
if let Err(e) = independent_push_notifications_service_helper::remove_token(old_token) {
eprintln!("Failed to un-register from independent push notifications service! {}", e);
}
}