@@ -884,34 +884,34 @@ bool attachment::is_remix() const {
884
884
885
885
time_t attachment::get_expire_time () const {
886
886
size_t attr_position = url.find (' ?' );
887
- /* If no attributes were sent in url, we do not need to parse more*/
887
+ /* If no attributes were sent in url, we do not need to parse more */
888
888
if (url.npos == attr_position){
889
889
return 0 ;
890
890
}
891
- std::string attributes = url.substr (attr_position+ 1 );
892
- std::vector<std::string> attr_list = utility::tokenize (attributes," &" );
893
- auto ex_attr = std::find_if (attr_list.begin (), attr_list.end (),[](const std::string& s){return s.substr (0 ,3 ) == " ex=" ;});
891
+ std::string attributes = url.substr (attr_position + 1 );
892
+ std::vector<std::string> attr_list = utility::tokenize (attributes, " &" );
893
+ auto ex_attr = std::find_if (attr_list.begin (), attr_list.end (), [](const std::string& s){return s.substr (0 , 3 ) == " ex=" ;});
894
894
if (attr_list.end () == ex_attr){
895
895
return 0 ;
896
896
}
897
- /* Erase 'ex=' prefix before parsing*/
898
- return std::stol (ex_attr->substr (3 ),nullptr ,16 );
897
+ /* Erase 'ex=' prefix before parsing */
898
+ return std::stol (ex_attr->substr (3 ), nullptr , 16 );
899
899
}
900
900
901
901
time_t attachment::get_issued_time () const {
902
902
size_t attr_position = url.find (' ?' );
903
- /* No attributes were sent in url, so we do not need to parse more*/
903
+ /* No attributes were sent in url, so we do not need to parse more */
904
904
if (url.npos == attr_position){
905
905
return 0 ;
906
906
}
907
- std::string attributes = url.substr (attr_position+ 1 );
908
- std::vector<std::string> attr_list = utility::tokenize (attributes," &" );
909
- auto is_attr = std::find_if (attr_list.begin (), attr_list.end (),[](const std::string& s){return s.substr (0 ,3 ) == " is=" ;});
907
+ std::string attributes = url.substr (attr_position + 1 );
908
+ std::vector<std::string> attr_list = utility::tokenize (attributes, " &" );
909
+ auto is_attr = std::find_if (attr_list.begin (), attr_list.end (), [](const std::string& s){return s.substr (0 , 3 ) == " is=" ;});
910
910
if (attr_list.end () == is_attr){
911
911
return 0 ;
912
912
}
913
- /* Erase 'is=' prefix before parsing*/
914
- return std::stol (is_attr->substr (3 ),nullptr ,16 );
913
+ /* Erase 'is=' prefix before parsing */
914
+ return std::stol (is_attr->substr (3 ), nullptr , 16 );
915
915
}
916
916
917
917
json message::to_json (bool with_id, bool is_interaction_response) const {
0 commit comments