rust_rcs_client/chat_bot/
chatbot_config.rs1use crate::provisioning::rcs_application::RcsApplication;
16
17pub struct ChatbotConfig {
18 pub chatbot_directory: Option<String>,
19 pub bot_info_fqdn: Option<String>,
20 pub specific_chatbots_lists: Option<String>,
21}
22
23impl ChatbotConfig {
24 pub fn new() -> ChatbotConfig {
25 ChatbotConfig {
26 chatbot_directory: None,
27 bot_info_fqdn: None,
28 specific_chatbots_lists: None,
29 }
30 }
31
32 pub fn update_configuration(&mut self, rcs_app: &RcsApplication) {
33 if let Some(messaging_config) = rcs_app.get_messaging_config() {
34 if let Some(chatbot_config) = messaging_config.get_chat_bot_config() {
35 self.chatbot_directory = chatbot_config.get_chatbot_directory();
36 self.bot_info_fqdn = chatbot_config.get_bot_info_fqdn();
37 self.specific_chatbots_lists = chatbot_config.get_specific_chatbots_lists();
38 }
39 }
40 }
41}