···6262// Returns path segment, without leading slash, as would be used in an atproto repository key. Or empty string if there is no path.
6363func (n ATURI) Path() string {
6464 parts := strings.SplitN(string(n), "/", 5)
6565- if len(parts) < 3 {
6565+ if len(parts) < 4 {
6666 // something has gone wrong (would not validate)
6767 return ""
6868 }
6969- if len(parts) == 3 {
7070- return parts[2]
6969+ if len(parts) == 4 {
7070+ return parts[3]
7171 }
7272- return parts[2] + "/" + parts[3]
7272+ return parts[3] + "/" + parts[4]
7373}
74747575// Returns a valid NSID if there is one in the appropriate part of the path, otherwise empty.