mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 23:56:31 +01:00
remove deleted gallery entries for recommendations
This commit is contained in:
@@ -164,7 +164,7 @@ class DicoverContentCurrentlyPopularGallery(DVMTaskInterface):
|
|||||||
await cli.connect()
|
await cli.connect()
|
||||||
|
|
||||||
filtreactions = Filter().kinds([definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REPOST,
|
filtreactions = Filter().kinds([definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REPOST,
|
||||||
definitions.EventDefinitions.KIND_REACTION,
|
definitions.EventDefinitions.KIND_REACTION, definitions.EventDefinitions.KIND_DELETION,
|
||||||
definitions.EventDefinitions.KIND_NOTE]).events(ids).since(since)
|
definitions.EventDefinitions.KIND_NOTE]).events(ids).since(since)
|
||||||
|
|
||||||
dbopts = NegentropyOptions().direction(NegentropyDirection.DOWN)
|
dbopts = NegentropyOptions().direction(NegentropyDirection.DOWN)
|
||||||
@@ -179,6 +179,14 @@ class DicoverContentCurrentlyPopularGallery(DVMTaskInterface):
|
|||||||
|
|
||||||
for event in events:
|
for event in events:
|
||||||
if event.created_at().as_secs() > timestamp_since:
|
if event.created_at().as_secs() > timestamp_since:
|
||||||
|
filt1 = Filter().kinds([definitions.EventDefinitions.KIND_DELETION]).event(event.id()).limit(1)
|
||||||
|
deletions = await databasegallery.query([filt1])
|
||||||
|
if len(deletions) > 0:
|
||||||
|
print("Deleted event, skipping")
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
filt = Filter().kinds([definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REPOST,
|
filt = Filter().kinds([definitions.EventDefinitions.KIND_ZAP, definitions.EventDefinitions.KIND_REPOST,
|
||||||
definitions.EventDefinitions.KIND_REACTION,
|
definitions.EventDefinitions.KIND_REACTION,
|
||||||
definitions.EventDefinitions.KIND_NOTE]).event(event.id()).since(since)
|
definitions.EventDefinitions.KIND_NOTE]).event(event.id()).since(since)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class EventDefinitions:
|
|||||||
KIND_NOTE = Kind(1)
|
KIND_NOTE = Kind(1)
|
||||||
KIND_FOLLOW_LIST = Kind(3)
|
KIND_FOLLOW_LIST = Kind(3)
|
||||||
KIND_DM = Kind(4)
|
KIND_DM = Kind(4)
|
||||||
|
KIND_DELETION = Kind(5)
|
||||||
KIND_REPOST = Kind(6)
|
KIND_REPOST = Kind(6)
|
||||||
KIND_REACTION = Kind(7)
|
KIND_REACTION = Kind(7)
|
||||||
KIND_NIP94_METADATA = Kind(1063)
|
KIND_NIP94_METADATA = Kind(1063)
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
VERSION = '0.7.10'
|
VERSION = '0.7.11'
|
||||||
DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines'
|
DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines'
|
||||||
LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')
|
LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ from nostr_dvm.utils.admin_utils import AdminConfig
|
|||||||
from nostr_dvm.utils.dvmconfig import build_default_config
|
from nostr_dvm.utils.dvmconfig import build_default_config
|
||||||
from nostr_dvm.utils.nip89_utils import create_amount_tag, NIP89Config, check_and_set_d_tag
|
from nostr_dvm.utils.nip89_utils import create_amount_tag, NIP89Config, check_and_set_d_tag
|
||||||
|
|
||||||
rebroadcast_NIP89 = True # Announce NIP89 on startup
|
rebroadcast_NIP89 = False # Announce NIP89 on startup
|
||||||
rebroadcast_NIP65_Relay_List = True
|
rebroadcast_NIP65_Relay_List = False
|
||||||
update_profile = True
|
update_profile = False
|
||||||
|
|
||||||
global_update_rate = 1200 # set this high on first sync so db can fully sync before another process trys to.
|
global_update_rate = 1200 # set this high on first sync so db can fully sync before another process trys to.
|
||||||
use_logger = True
|
use_logger = True
|
||||||
|
|||||||
Reference in New Issue
Block a user