nip34: return events, not pointer to events.
This commit is contained in:
@@ -49,7 +49,7 @@ func ParseRepository(event nostr.Event) Repository {
|
||||
return repo
|
||||
}
|
||||
|
||||
func (r Repository) ToEvent() *nostr.Event {
|
||||
func (r Repository) ToEvent() nostr.Event {
|
||||
tags := make(nostr.Tags, 0, 10)
|
||||
|
||||
tags = append(tags, nostr.Tag{"d", r.ID})
|
||||
@@ -88,7 +88,7 @@ func (r Repository) ToEvent() *nostr.Event {
|
||||
tags = append(tags, tag)
|
||||
}
|
||||
|
||||
return &nostr.Event{
|
||||
return nostr.Event{
|
||||
Kind: nostr.KindRepositoryAnnouncement,
|
||||
Tags: tags,
|
||||
CreatedAt: nostr.Now(),
|
||||
|
||||
@@ -45,7 +45,7 @@ func ParseRepositoryState(event nostr.Event) RepositoryState {
|
||||
return st
|
||||
}
|
||||
|
||||
func (rs RepositoryState) ToEvent() *nostr.Event {
|
||||
func (rs RepositoryState) ToEvent() nostr.Event {
|
||||
tags := make(nostr.Tags, 1, 2+len(rs.Branches)+len(rs.Tags))
|
||||
|
||||
tags[0] = nostr.Tag{"d", rs.ID}
|
||||
@@ -59,7 +59,7 @@ func (rs RepositoryState) ToEvent() *nostr.Event {
|
||||
tags = append(tags, nostr.Tag{"HEAD", "ref: refs/heads/" + rs.HEAD})
|
||||
}
|
||||
|
||||
return &nostr.Event{
|
||||
return nostr.Event{
|
||||
Kind: 30618,
|
||||
Tags: tags,
|
||||
CreatedAt: nostr.Now(),
|
||||
|
||||
Reference in New Issue
Block a user