python-nostr
python-nostr copied to clipboard
remove default tags list from Event class.
Similar to the issue discovered in #23 . Make default tag list None and then assign self.tags an empty list if None
demo of bug:
from nostr.event import Event
from nostr.key import PrivateKey
# Create two separate events with default tags value
test_event = Event(
PrivateKey().public_key.hex(),
"test content"
)
test_event_2 = Event(
PrivateKey().public_key.hex(),
"test content 2"
)
# Append a tag to the first event
test_event.tags.append(["p","p tag"])
print(test_event_2.tags)
#out: [["p","p tag"]]