2021-03-08 17:45:10 +00:00
|
|
|
//! # User is writing message in conversation event
|
2021-03-07 18:30:02 +00:00
|
|
|
//!
|
|
|
|
//! @author Pierre Hubert
|
|
|
|
use serde::Serialize;
|
|
|
|
|
|
|
|
use crate::data::conversation::ConvID;
|
|
|
|
use crate::data::user::UserID;
|
|
|
|
|
|
|
|
#[derive(Serialize)]
|
2021-03-08 17:45:10 +00:00
|
|
|
pub struct UserIsWritingMessageInConversation {
|
2021-03-07 18:30:02 +00:00
|
|
|
user_id: u64,
|
|
|
|
conv_id: u64,
|
|
|
|
}
|
|
|
|
|
2021-03-08 17:45:10 +00:00
|
|
|
impl UserIsWritingMessageInConversation {
|
2021-03-07 18:30:02 +00:00
|
|
|
pub fn new(user_id: &UserID, conv_id: ConvID) -> Self {
|
|
|
|
Self {
|
|
|
|
user_id: user_id.id(),
|
|
|
|
conv_id: conv_id.id(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|