mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 18:46:27 +01:00
added inactive following dvm
This commit is contained in:
@@ -11,7 +11,7 @@ from utils.nostr_utils import get_event_by_id
|
||||
def input_data_file_duration(event, dvm_config, client, start=0, end=0):
|
||||
#print("[" + dvm_config.NIP89.NAME + "] Getting Duration of the Media file..")
|
||||
input_value = ""
|
||||
input_type = "url"
|
||||
input_type = ""
|
||||
for tag in event.tags():
|
||||
if tag.as_vec()[0] == 'i':
|
||||
input_value = tag.as_vec()[1]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from datetime import timedelta
|
||||
from hashlib import sha256
|
||||
|
||||
from nostr_sdk import Tag, Keys, EventBuilder, Filter, Alphabet, PublicKey, Event
|
||||
|
||||
@@ -15,10 +16,13 @@ class NIP89Config:
|
||||
|
||||
|
||||
def nip89_create_d_tag(name, pubkey, image):
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
m.update(str(name + image + pubkey).encode("utf-8"))
|
||||
d_tag = m.hexdigest()[0:16]
|
||||
#import hashlib
|
||||
#m = hashlib.md5()
|
||||
#m.update(str(name + image + pubkey).encode("utf-8"))
|
||||
#d_tag = m.hexdigest()[0:16]
|
||||
|
||||
key_str = str(name + image + pubkey)
|
||||
d_tag = sha256(key_str.encode('utf-8')).hexdigest()[:16]
|
||||
return d_tag
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user