Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee

fix: feed links by did, not handle

pdewey.com 8a5a257d 611e7f6d

verified
+8 -8
+8 -8
internal/web/pages/feed.templ
··· 180 180 <!-- Author row --> 181 181 <div class="mb-3"> 182 182 @components.UserBadge(components.UserBadgeProps{ 183 - ProfileURL: "/profile/" + item.Author.Handle, 183 + ProfileURL: "/profile/" + item.Author.DID, 184 184 AvatarURL: getAvatarURL(item.Author.Avatar), 185 185 DisplayName: getDisplayName(item.Author.DisplayName), 186 186 Handle: item.Author.Handle, ··· 304 304 templ FeedBrewContentClickable(item *feed.FeedItem) { 305 305 if item.Brew != nil { 306 306 <a 307 - href={ templ.SafeURL(fmt.Sprintf("/brews/%s?owner=%s", item.Brew.RKey, item.Author.Handle)) } 307 + href={ templ.SafeURL(fmt.Sprintf("/brews/%s?owner=%s", item.Brew.RKey, item.Author.DID)) } 308 308 class="block hover:opacity-90 transition-opacity" 309 309 > 310 310 @FeedBrewContent(item) ··· 519 519 switch item.RecordType { 520 520 case lexicons.RecordTypeBrew: 521 521 if item.Brew != nil { 522 - return fmt.Sprintf("/brews/%s?owner=%s", item.Brew.RKey, item.Author.Handle) 522 + return fmt.Sprintf("/brews/%s?owner=%s", item.Brew.RKey, item.Author.DID) 523 523 } 524 524 case lexicons.RecordTypeBean: 525 525 if item.Bean != nil { 526 - return fmt.Sprintf("/beans/%s?owner=%s", item.Bean.RKey, item.Author.Handle) 526 + return fmt.Sprintf("/beans/%s?owner=%s", item.Bean.RKey, item.Author.DID) 527 527 } 528 528 case lexicons.RecordTypeRoaster: 529 529 if item.Roaster != nil { 530 - return fmt.Sprintf("/roasters/%s?owner=%s", item.Roaster.RKey, item.Author.Handle) 530 + return fmt.Sprintf("/roasters/%s?owner=%s", item.Roaster.RKey, item.Author.DID) 531 531 } 532 532 case lexicons.RecordTypeGrinder: 533 533 if item.Grinder != nil { 534 - return fmt.Sprintf("/grinders/%s?owner=%s", item.Grinder.RKey, item.Author.Handle) 534 + return fmt.Sprintf("/grinders/%s?owner=%s", item.Grinder.RKey, item.Author.DID) 535 535 } 536 536 case lexicons.RecordTypeBrewer: 537 537 if item.Brewer != nil { 538 - return fmt.Sprintf("/brewers/%s?owner=%s", item.Brewer.RKey, item.Author.Handle) 538 + return fmt.Sprintf("/brewers/%s?owner=%s", item.Brewer.RKey, item.Author.DID) 539 539 } 540 540 } 541 - return fmt.Sprintf("/profile/%s", item.Author.Handle) 541 + return fmt.Sprintf("/profile/%s", item.Author.DID) 542 542 } 543 543 544 544 func getFeedItemShareTitle(item *feed.FeedItem) string {