Skip to content

Commit

Permalink
fix incorrect recogniser for a tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mleku committed Dec 10, 2024
1 parent 40e8d3d commit 084d9f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ratel/getindexkeysforevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func GetIndexKeysForEvent(ev *event.T, ser *serial.T) (keyz []by) {
// get key prefix (with full length) and offset where to write the last
// parts
prf, elems := index.P(0), []keys.Element(nil)
if prf, elems, err = GetTagKeyElements(st(t.F()[1]), CA, ser); chk.E(err) {
if prf, elems, err = GetTagKeyElements(st(t.F()[0]), st(t.F()[1]), CA, ser); chk.E(err) {
log.I.F("%v", t.ToStringSlice())
return
}
Expand Down
4 changes: 2 additions & 2 deletions ratel/gettagkeyelements.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"realy.lol/ratel/keys/serial"
)

func GetTagKeyElements(tagValue string, CA *createdat.T,
func GetTagKeyElements(tagKey, tagValue st, CA *createdat.T,
ser *serial.T) (prf index.P,
elems []keys.Element, err er) {

Expand All @@ -37,7 +37,7 @@ func GetTagKeyElements(tagValue string, CA *createdat.T,
}
}
// check for a tag
if strings.Count(tagValue, ":") == 2 {
if tagKey == "a" && strings.Count(tagValue, ":") == 2 {
// this means we will get 3 pieces here
split := strings.Split(tagValue, ":")
// middle element should be a public key so must be 64 hex ciphers
Expand Down

0 comments on commit 084d9f5

Please sign in to comment.