@@ -635,33 +635,6 @@ std::string Messaging::deleteMessages(const std::string &messageId) {
635635 }
636636}
637637
638- std::string Messaging::updateEmail (
639- const std::string& messageId,
640- const std::string& subject,
641- const std::string& content
642- ) {
643- if (messageId.empty ()) {
644- throw AppwriteException (" Missing required parameter: 'messageId'" );
645- }
646- if (subject.empty ()) {
647- throw AppwriteException (" Missing required parameter: 'subject'" );
648- }
649- if (content.empty ()) {
650- throw AppwriteException (" Missing required parameter: 'content'" );
651- }
652-
653- std::string url = Config::API_BASE_URL + " /messaging/messages/email/" + Utils::urlEncode (messageId);
654-
655- std::string payload = R"( {"subject":")" + Utils::escapeJsonString (subject) +
656- R"( ","content":")" + Utils::escapeJsonString (content) + R"( "})" ;
657-
658- std::vector<std::string> headers = Config::getHeaders (projectId);
659- headers.push_back (" X-Appwrite-Key: " + apiKey);
660- headers.push_back (" Content-Type: application/json" );
661-
662- std::string response;
663- int statusCode = Utils::patchRequest (url, payload, headers, response);
664-
665638std::string Messaging::listTargets (const std::string &messageId,
666639 const std::vector<std::string> &queries) {
667640 if (messageId.empty ()) {
@@ -693,9 +666,4 @@ std::string Messaging::listTargets(const std::string &messageId,
693666 " \n\n Response: " + response);
694667 }
695668}
696- throw AppwriteException (
697- " Error fetching message targets. Status code: " + std::to_string (statusCode) +
698- " \n\n Response: " + response);
699- }
700- }
701669
0 commit comments