mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-07-22 21:42:40 +00:00
feat(webapi): impl identity description retrieval
This commit is contained in:
parent
d5cc097e7a
commit
c3842a6d3b
6 changed files with 126 additions and 6 deletions
|
@ -5,6 +5,7 @@ use std::fmt;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
use crate::identity::UserIdentityDesc;
|
||||
use crate::msg::{Id, MemberPermission, RoomAttrs, SignedChatMsgWithId};
|
||||
use crate::PubKey;
|
||||
|
||||
|
@ -172,6 +173,15 @@ pub struct RoomMember {
|
|||
pub last_seen_cid: Option<Id>,
|
||||
}
|
||||
|
||||
/// Server cached user identity description.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct UserIdentityDescResponse<I = UserIdentityDesc> {
|
||||
/// The identity description of the requested user.
|
||||
#[cfg_attr(feature = "schemars", schemars(with = "UserIdentityDesc"))]
|
||||
pub identity: I,
|
||||
}
|
||||
|
||||
/// A server-to-client event.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue