diff --git a/nostr_dvm/tasks/content_discovery_currently_popular.py b/nostr_dvm/tasks/content_discovery_currently_popular.py index 6e81f26..e13c884 100644 --- a/nostr_dvm/tasks/content_discovery_currently_popular.py +++ b/nostr_dvm/tasks/content_discovery_currently_popular.py @@ -104,7 +104,7 @@ class DicoverContentCurrentlyPopular(DVMTaskInterface): for event in events: if event.created_at().as_secs() > timestamp_hour_ago: ns.finallist[event.id().to_hex()] = 0 - filt = Filter().kinds([definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REACTION, definitions.EventDefinitions.KIND_NOTE]).event(event.id()).since(lasthour) + filt = Filter().kinds([definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REPOST, definitions.EventDefinitions.KIND_REACTION, definitions.EventDefinitions.KIND_NOTE]).event(event.id()).since(lasthour) reactions = cli.database().query([filt]) ns.finallist[event.id().to_hex()] = len(reactions) diff --git a/nostr_dvm/tasks/content_discovery_currently_popular_followers.py b/nostr_dvm/tasks/content_discovery_currently_popular_followers.py index ebc77eb..40c2757 100644 --- a/nostr_dvm/tasks/content_discovery_currently_popular_followers.py +++ b/nostr_dvm/tasks/content_discovery_currently_popular_followers.py @@ -137,7 +137,7 @@ class DicoverContentCurrentlyPopularFollowers(DVMTaskInterface): if event.created_at().as_secs() > timestamp_hour_ago: ns.finallist[event.id().to_hex()] = 0 filt = Filter().kinds( - [definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REACTION, + [definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REACTION, definitions.EventDefinitions.KIND_REPOST, definitions.EventDefinitions.KIND_NOTE]).event(event.id()).since(lasthour) reactions = cli.database().query([filt]) ns.finallist[event.id().to_hex()] = len(reactions) diff --git a/nostr_dvm/utils/definitions.py b/nostr_dvm/utils/definitions.py index 737d90e..ee6aa50 100644 --- a/nostr_dvm/utils/definitions.py +++ b/nostr_dvm/utils/definitions.py @@ -7,6 +7,7 @@ from nostr_sdk import Event, Kind class EventDefinitions: KIND_NOTE = Kind(1) KIND_DM = Kind(4) + KIND_REPOST = Kind(6) KIND_REACTION = Kind(7) KIND_ZAP = Kind(9735) KIND_ANNOUNCEMENT = Kind(31990) diff --git a/ui/noogle/src/components/ImageGeneration.vue b/ui/noogle/src/components/ImageGeneration.vue index 1631d73..a1f0282 100644 --- a/ui/noogle/src/components/ImageGeneration.vue +++ b/ui/noogle/src/components/ImageGeneration.vue @@ -466,13 +466,83 @@ const submitHandler = async () => {
-

{{dvm.reactions.positive.length}} - - {{dvm.reactions.negative.length}} - -

+

{{dvm.reactions.positive.length}} -

+ + +
+ +
+
+ + + +
+
+
+

Liked results by

+
+
+
+
+ DVM Picture + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+ + {{dvm.reactions.negative.length}} +
+ +
+
+ + + +
+
+
+

Disliked results by

+
+
+
+ +
+ + DVM Picture + +
+ + +
+
+ +
+ + +
+
+
+ +
+ + + + +

+ @@ -543,6 +613,24 @@ h3 { box-shadow: inset 0 4px 4px 0 rgb(0 0 0 / 10%); } +.wotplayeauthor-wrapper { + padding: 0px; + display: flex; + align-items: start; + justify-items: start +; +} +.wotavatar { + margin-right: 0px; + margin-left: 0px; + + width: 30px; + height: 30px; + border-radius: 50%; + object-fit: cover; + box-shadow: inset 0 4px 4px 0 rgb(0 0 0 / 10%); +} + .greetings h1, .greetings h3 { text-align: left; diff --git a/ui/noogle/src/components/helper/Helper.vue b/ui/noogle/src/components/helper/Helper.vue index 0d7a67b..5a5571c 100644 --- a/ui/noogle/src/components/helper/Helper.vue +++ b/ui/noogle/src/components/helper/Helper.vue @@ -405,18 +405,27 @@ export async function dvmreactions(dvmid, authors) { let reactionfilter = new Filter().kind(7).pubkey (dvmid).authors(authorscheck).since(Timestamp.fromSecs(Timestamp.now().asSecs() - 60*60*24*60)) // reactions by our followers in the last 2 months let evts = await client.getEventsOf([reactionfilter], Duration.fromSecs(5)) + let npubs = [] + for (let evt of evts){ + npubs.push(evt.author) + } + + let users = await get_user_infos(npubs) + console.log(users) if (evts.length > 0){ for (let reaction of evts){ if (reaction.content === "👎"){ - reactions.negative.push(reaction.author.toHex()) + let profile = users.find(x => x.author === reaction.author.toHex() ) + reactions.negative.push(profile) /*if (reaction.author.toHex() === store.state.pubkey.toHex()){ reactions.negativeUser = true }*/ } else{ - reactions.positive.push(reaction.author.toHex()) + let profile = users.find(x => x.author === reaction.author.toHex() ) + reactions.positive.push(profile) // if (reaction.author.toHex() === store.state.pubkey.toHex()){ //reactions.positiveUser = true // }