python-nostr icon indicating copy to clipboard operation
python-nostr copied to clipboard

remove default tags list from Event class.

Open flothjl opened this issue 2 years ago • 0 comments

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"]]

flothjl avatar Jan 29 '23 19:01 flothjl