summaryrefslogtreecommitdiff
path: root/src/conversation/handlers/send/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/handlers/send/mod.rs')
-rw-r--r--src/conversation/handlers/send/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/conversation/handlers/send/mod.rs b/src/conversation/handlers/send/mod.rs
index 1c8ac63..c8be59c 100644
--- a/src/conversation/handlers/send/mod.rs
+++ b/src/conversation/handlers/send/mod.rs
@@ -25,7 +25,7 @@ pub async fn handler(
) -> Result<Response, Error> {
let message = app
.messages()
- .send(&conversation, &identity.user, &sent_at, &request.body)
+ .send(&conversation, &identity.login, &sent_at, &request.body)
.await?;
Ok(Response(message))
@@ -57,7 +57,10 @@ impl IntoResponse for Error {
SendError::ConversationNotFound(_) | SendError::ConversationDeleted(_) => {
NotFound(error).into_response()
}
- SendError::Name(_) | SendError::Database(_) => Internal::from(error).into_response(),
+ SendError::SenderNotFound(_)
+ | SendError::SenderDeleted(_)
+ | SendError::Name(_)
+ | SendError::Database(_) => Internal::from(error).into_response(),
}
}
}