;
+
/**
* a timestamp, events must be newer than this to pass
*/
@@ -125,6 +130,9 @@ export class Subscriptions {
if (this.PTags) {
ret["#p"] = Array.from(this.PTags);
}
+ if(this.HashTags) {
+ ret["#t"] = Array.from(this.HashTags);
+ }
if (this.Since !== null) {
ret.since = this.Since;
}
diff --git a/src/nostr/Tag.ts b/src/nostr/Tag.ts
index 2342914c..33e00417 100644
--- a/src/nostr/Tag.ts
+++ b/src/nostr/Tag.ts
@@ -7,6 +7,7 @@ export default class Tag {
PubKey?: HexKey;
Relay?: string;
Marker?: string;
+ Hashtag?: string;
Index: number;
Invalid: boolean;
@@ -35,6 +36,10 @@ export default class Tag {
}
break;
}
+ case "t": {
+ this.Hashtag = tag[1];
+ break;
+ }
case "delegation": {
this.PubKey = tag[1];
break;
@@ -53,6 +58,9 @@ export default class Tag {
case "p": {
return this.PubKey ? ["p", this.PubKey] : null;
}
+ case "t": {
+ return ["t", this.Hashtag!];
+ }
default: {
return this.Original;
}
diff --git a/src/nostr/index.ts b/src/nostr/index.ts
index 62da4517..cac6946e 100644
--- a/src/nostr/index.ts
+++ b/src/nostr/index.ts
@@ -34,6 +34,7 @@ export type RawReqFilter = {
kinds?: number[],
"#e"?: u256[],
"#p"?: u256[],
+ "#t"?: string[],
since?: number,
until?: number,
limit?: number
diff --git a/src/pages/HashTagsPage.tsx b/src/pages/HashTagsPage.tsx
new file mode 100644
index 00000000..0609e8e5
--- /dev/null
+++ b/src/pages/HashTagsPage.tsx
@@ -0,0 +1,16 @@
+import { useParams } from "react-router-dom";
+import Timeline from "../element/Timeline";
+
+const HashTagsPage = () => {
+ const params = useParams();
+ const tag = params.tag!.toLowerCase();
+
+ return (
+ <>
+ #{tag}
+
+ >
+ )
+}
+
+export default HashTagsPage;
\ No newline at end of file
diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx
index de29dbec..d697d63e 100644
--- a/src/pages/ProfilePage.tsx
+++ b/src/pages/ProfilePage.tsx
@@ -49,15 +49,15 @@ export default function ProfilePage() {
return (
- {user?.display_name || user?.name || 'Nostrich'}
-
+ {user?.display_name || user?.name || 'Nostrich'}
+
{user?.nip05 && }
)
}
-
+
function bio() {
const lnurl = extractLnAddress(user?.lud16 || user?.lud06 || "");
return (
@@ -88,7 +88,7 @@ export default function ProfilePage() {
function tabContent() {
switch (tab) {
case ProfileTab.Notes:
- return ;
+ return ;
case ProfileTab.Follows: {
if (isMe) {
return (
diff --git a/src/pages/Root.tsx b/src/pages/Root.tsx
index 4b496cc9..d5f8a12d 100644
--- a/src/pages/Root.tsx
+++ b/src/pages/Root.tsx
@@ -6,6 +6,7 @@ import Timeline from "../element/Timeline";
import { useState } from "react";
import { RootState } from "../state/Store";
import { HexKey } from "../nostr";
+import { TimelineSubject } from "../feed/TimelineFeed";
const RootTab = {
Posts: 0,
@@ -25,6 +26,8 @@ export default function RootPage() {
}
}
+ const isGlobal = loggedOut || tab === RootTab.Global;
+ const timelineSubect: TimelineSubject = isGlobal ? { type: "global", items: [] } : { type: "pubkey", items: follows };
return (
<>
{pubKey ? <>
@@ -41,7 +44,7 @@ export default function RootPage() {
> : null}
{followHints()}
-
+
>
);
}
\ No newline at end of file