check name.length > 0
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
This commit is contained in:
parent
40e05480e6
commit
4e2b7e6bb9
@ -18,9 +18,9 @@ export function getDisplayNameOrPlaceHolder(user: UserMetadata | undefined, pubk
|
|||||||
let name = hexToBech32(NostrPrefix.PublicKey, pubkey).substring(0, 12);
|
let name = hexToBech32(NostrPrefix.PublicKey, pubkey).substring(0, 12);
|
||||||
let isPlaceHolder = false;
|
let isPlaceHolder = false;
|
||||||
|
|
||||||
if (user?.display_name) {
|
if (typeof user?.display_name === "string" && user.display_name.length > 0) {
|
||||||
name = user.display_name;
|
name = user.display_name;
|
||||||
} else if (user?.name) {
|
} else if (typeof user?.name === "string" && user.name.length > 0) {
|
||||||
name = user.name;
|
name = user.name;
|
||||||
} else if (pubkey && process.env.ANIMAL_NAME_PLACEHOLDERS) {
|
} else if (pubkey && process.env.ANIMAL_NAME_PLACEHOLDERS) {
|
||||||
name = AnimalName(pubkey);
|
name = AnimalName(pubkey);
|
||||||
|
@ -6,7 +6,7 @@ import Nip5Service from "Element/Nip5Service";
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import messages from "./messages";
|
import messages from "./messages";
|
||||||
import IrisAccount from "../Element/IrisAccount/IrisAccount";
|
import IrisAccount from "Element/IrisAccount/IrisAccount";
|
||||||
|
|
||||||
export default function FreeNostrAddressPage() {
|
export default function FreeNostrAddressPage() {
|
||||||
return (
|
return (
|
||||||
|
@ -25,7 +25,7 @@ import { useEventFeed } from "Feed/EventFeed";
|
|||||||
import { LoginSession, LoginStore } from "Login";
|
import { LoginSession, LoginStore } from "Login";
|
||||||
import { Nip28ChatSystem } from "chat/nip28";
|
import { Nip28ChatSystem } from "chat/nip28";
|
||||||
import { ChatParticipantProfile } from "Element/Chat/ChatParticipant";
|
import { ChatParticipantProfile } from "Element/Chat/ChatParticipant";
|
||||||
import { getDisplayName } from "../Element/User/DisplayName";
|
import { getDisplayName } from "Element/User/DisplayName";
|
||||||
|
|
||||||
const TwoCol = 768;
|
const TwoCol = 768;
|
||||||
const ThreeCol = 1500;
|
const ThreeCol = 1500;
|
||||||
|
@ -19,7 +19,7 @@ import Text from "Element/Text";
|
|||||||
import { formatShort } from "Number";
|
import { formatShort } from "Number";
|
||||||
import { LiveEvent } from "Element/LiveEvent";
|
import { LiveEvent } from "Element/LiveEvent";
|
||||||
import ProfilePreview from "Element/User/ProfilePreview";
|
import ProfilePreview from "Element/User/ProfilePreview";
|
||||||
import { getDisplayName } from "../Element/User/DisplayName";
|
import { getDisplayName } from "Element/User/DisplayName";
|
||||||
|
|
||||||
function notificationContext(ev: TaggedNostrEvent) {
|
function notificationContext(ev: TaggedNostrEvent) {
|
||||||
switch (ev.kind) {
|
switch (ev.kind) {
|
||||||
|
@ -58,7 +58,7 @@ import { ZapTarget } from "Zapper";
|
|||||||
import { useStatusFeed } from "Feed/StatusFeed";
|
import { useStatusFeed } from "Feed/StatusFeed";
|
||||||
|
|
||||||
import messages from "./messages";
|
import messages from "./messages";
|
||||||
import { SpotlightMediaModal } from "../Element/Deck/SpotlightMedia";
|
import { SpotlightMediaModal } from "Element/Deck/SpotlightMedia";
|
||||||
|
|
||||||
const NOTES = 0;
|
const NOTES = 0;
|
||||||
const REACTIONS = 1;
|
const REACTIONS = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user