@@ -947,40 +947,38 @@ void process(mGetUserOofSettingsRequest&& request, XMLElement* response, const E
947947 unsigned int oof_state = configFile != nullptr ? configFile->get_ll (" oof_state" ) : 0 ;
948948 bool allow_external_oof = configFile != nullptr ? configFile->get_ll (" allow_external_oof" ) : false ;
949949 bool external_audience = configFile != nullptr ? configFile->get_ll (" external_audience" ) : false ;
950- if (true ) {
951- switch (oof_state) {
952- case 1 :
953- data.OofSettings ->OofState = " Enabled" ; break ;
954- case 2 :
955- data.OofSettings ->OofState = " Scheduled" ; break ;
956- default :
957- data.OofSettings ->OofState = " Disabled" ; break ;
958- }
959- if (allow_external_oof)
960- data.OofSettings ->ExternalAudience = external_audience ? " Known" : " All" ;
961- else
962- data.OofSettings ->ExternalAudience = " None" ;
963- auto start_time = configFile->get_value (" start_time" );
964- auto end_time = configFile->get_value (" end_time" );
965- if (start_time != nullptr && end_time != nullptr ) {
966- tDuration& Duration = data.OofSettings ->Duration .emplace ();
967- Duration.StartTime = clock::from_time_t (strtoll (start_time, nullptr , 0 ));
968- Duration.EndTime = clock::from_time_t (strtoll (end_time, nullptr , 0 ));
969- } else {
970- auto &dur = data.OofSettings ->Duration .emplace ();
971- dur.StartTime = clock::now ();
972- dur.EndTime = dur.StartTime + std::chrono::days (1 );
973- }
974- optional<string> reply = readMessageBody (maildir+" /config/internal-reply" );
975- if (reply)
976- data.OofSettings ->InternalReply .emplace (std::move (reply));
977- else
978- data.OofSettings ->InternalReply .emplace (std::string{});
979- if ((reply = readMessageBody (maildir+" /config/external-reply" )))
980- data.OofSettings ->ExternalReply .emplace (std::move (reply));
981- else
982- data.OofSettings ->ExternalReply .emplace (std::string{});
950+ switch (oof_state) {
951+ case 1 :
952+ data.OofSettings ->OofState = " Enabled" ; break ;
953+ case 2 :
954+ data.OofSettings ->OofState = " Scheduled" ; break ;
955+ default :
956+ data.OofSettings ->OofState = " Disabled" ; break ;
983957 }
958+ if (allow_external_oof)
959+ data.OofSettings ->ExternalAudience = external_audience ? " Known" : " All" ;
960+ else
961+ data.OofSettings ->ExternalAudience = " None" ;
962+ auto start_time = configFile->get_value (" start_time" );
963+ auto end_time = configFile->get_value (" end_time" );
964+ if (start_time != nullptr && end_time != nullptr ) {
965+ tDuration& Duration = data.OofSettings ->Duration .emplace ();
966+ Duration.StartTime = clock::from_time_t (strtoll (start_time, nullptr , 0 ));
967+ Duration.EndTime = clock::from_time_t (strtoll (end_time, nullptr , 0 ));
968+ } else {
969+ auto &dur = data.OofSettings ->Duration .emplace ();
970+ dur.StartTime = clock::now ();
971+ dur.EndTime = dur.StartTime + std::chrono::days (1 );
972+ }
973+ optional<string> reply = readMessageBody (maildir + " /config/internal-reply" );
974+ if (reply)
975+ data.OofSettings ->InternalReply .emplace (std::move (reply));
976+ else
977+ data.OofSettings ->InternalReply .emplace (std::string{});
978+ if ((reply = readMessageBody (maildir + " /config/external-reply" )))
979+ data.OofSettings ->ExternalReply .emplace (std::move (reply));
980+ else
981+ data.OofSettings ->ExternalReply .emplace (std::string{});
984982
985983 // Finalize response
986984 data.ResponseMessage .success ();
0 commit comments