nip34: fix .Branches -> .Tags for refs/tags/

This commit is contained in:
fiatjaf 2024-08-28 16:08:04 -03:00
parent 0750057b13
commit ddf28001cf

View File

@ -37,7 +37,7 @@ func ParseRepositoryState(event nostr.Event) RepositoryState {
if strings.HasPrefix(tag[0], "refs/heads/") { if strings.HasPrefix(tag[0], "refs/heads/") {
st.Branches[tag[0][11:]] = tag[1] st.Branches[tag[0][11:]] = tag[1]
} else if strings.HasPrefix(tag[0], "refs/tags/") { } else if strings.HasPrefix(tag[0], "refs/tags/") {
st.Branches[tag[0][10:]] = tag[1] st.Tags[tag[0][10:]] = tag[1]
} }
} }
} }