chore(desktop): satisfy file size ratchet

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
This commit is contained in:
Cea Stapleton Cordasco
2026-08-03 06:58:28 -05:00
parent e82d72d5c3
commit cb61ed5dbe
2 changed files with 5 additions and 10 deletions
+3 -8
View File
@@ -280,10 +280,7 @@ pub fn channel_members_from_event(event: &Event) -> Result<ChannelMembersRespons
// ── kind:0 (profile metadata) ───────────────────────────────────────────────
/// Convert a kind:0 metadata event to [`ProfileInfo`].
///
/// The event's `content` is a JSON object per NIP-01:
/// `{"name":"...","display_name":"...","picture":"...","about":"...","nip05":"..."}`.
/// Convert a kind:0 profile metadata event to [`ProfileInfo`].
pub fn profile_info_from_event(event: &Event) -> Result<ProfileInfo, String> {
let v: Value = serde_json::from_str(&event.content)
.map_err(|e| format!("kind:0 content is not valid JSON: {e}"))?;
@@ -309,10 +306,8 @@ pub fn profile_info_from_event(event: &Event) -> Result<ProfileInfo, String> {
})
}
/// Convert multiple kind:0 events to [`UsersBatchResponse`].
///
/// `requested_pubkeys` lets us populate `missing` for any pubkey that had
/// no metadata event in the input set.
/// Convert the most recent kind:0 event per pubkey to [`UsersBatchResponse`].
/// Requested pubkeys without metadata are returned separately.
pub fn users_batch_from_events(
events: &[Event],
requested_pubkeys: &[String],
+2 -2
View File
@@ -108,7 +108,7 @@ export type { Identity, IdentityStorage } from "./identityTypes";
export type Profile = {
pubkey: string;
displayName: string | null;
/** Relay-authoritative corporate display identity bound to this pubkey. */
/** Relay-authoritative display identity bound to this pubkey. */
verifiedName?: string | null;
avatarUrl: string | null;
about: string | null;
@@ -123,7 +123,7 @@ export type Profile = {
export type UserProfileSummary = {
displayName: string | null;
/** Relay-authoritative corporate display identity bound to this pubkey. */
/** Relay-authoritative display identity bound to this pubkey. */
verifiedName?: string | null;
/** Kind-0 `name` field, kept separate from `displayName` so @mention text
* can be matched against either alias (agents/CLI resolve mentions against