diff --git a/Userland/Libraries/LibIMAP/Client.cpp b/Userland/Libraries/LibIMAP/Client.cpp index 4f0c2e795d5..4a5b3c244a6 100644 --- a/Userland/Libraries/LibIMAP/Client.cpp +++ b/Userland/Libraries/LibIMAP/Client.cpp @@ -207,7 +207,7 @@ RefPtr>> cast_promise(RefPtr>> pr RefPtr>> Client::login(StringView username, StringView password) { - auto command = Command { CommandType::Login, m_current_command, { username, password } }; + auto command = Command { CommandType::Login, m_current_command, { serialize_astring(username), serialize_astring(password) } }; return cast_promise(send_command(move(command))); } @@ -241,7 +241,7 @@ RefPtr>> Client::send_simple_command(CommandType type RefPtr>> Client::select(StringView string) { - auto command = Command { CommandType::Select, m_current_command, { string } }; + auto command = Command { CommandType::Select, m_current_command, { serialize_astring(string) } }; return cast_promise(send_command(move(command))); } @@ -293,19 +293,19 @@ void Client::send_next_command() RefPtr>> Client::examine(StringView string) { - auto command = Command { CommandType::Examine, m_current_command, { string } }; + auto command = Command { CommandType::Examine, m_current_command, { serialize_astring(string) } }; return cast_promise(send_command(move(command))); } RefPtr>> Client::create_mailbox(StringView name) { - auto command = Command { CommandType::Create, m_current_command, { name } }; + auto command = Command { CommandType::Create, m_current_command, { serialize_astring(name) } }; return cast_promise(send_command(move(command))); } RefPtr>> Client::delete_mailbox(StringView name) { - auto command = Command { CommandType::Delete, m_current_command, { name } }; + auto command = Command { CommandType::Delete, m_current_command, { serialize_astring(name) } }; return cast_promise(send_command(move(command))); } @@ -426,12 +426,12 @@ RefPtr>> Client::append(StringView mailbox, Mess } RefPtr>> Client::subscribe(StringView mailbox) { - auto command = Command { CommandType::Subscribe, m_current_command, { mailbox } }; + auto command = Command { CommandType::Subscribe, m_current_command, { serialize_astring(mailbox) } }; return cast_promise(send_command(move(command))); } RefPtr>> Client::unsubscribe(StringView mailbox) { - auto command = Command { CommandType::Unsubscribe, m_current_command, { mailbox } }; + auto command = Command { CommandType::Unsubscribe, m_current_command, { serialize_astring(mailbox) } }; return cast_promise(send_command(move(command))); } RefPtr>> Client::authenticate(StringView method) @@ -441,13 +441,13 @@ RefPtr>> Client::authenticate(StringView method) } RefPtr>> Client::rename(StringView from, StringView to) { - auto command = Command { CommandType::Rename, m_current_command, { from, to } }; + auto command = Command { CommandType::Rename, m_current_command, { serialize_astring(from), serialize_astring(to) } }; return cast_promise(send_command(move(command))); } RefPtr>> Client::copy(Sequence sequence_set, StringView name, bool uid) { auto command = Command { - uid ? CommandType::UIDCopy : CommandType::Copy, m_current_command, { sequence_set.serialize(), name } + uid ? CommandType::UIDCopy : CommandType::Copy, m_current_command, { sequence_set.serialize(), serialize_astring(name) } }; return cast_promise(send_command(move(command)));