find a bug and squish it up and all day long you'll have good luck

This commit is contained in:
tobi 2025-03-17 18:16:59 +01:00
commit f257f779a9
5 changed files with 63 additions and 11 deletions

View file

@ -146,7 +146,7 @@ func (m *Module) prepareProfile(c *gin.Context) *profile {
statusResp, errWithCode := m.processor.Account().WebStatusesGet(
ctx,
account.ID,
false, // mediaOnly = false
mediaOnly,
maxStatusID,
)
if errWithCode != nil {
@ -169,6 +169,11 @@ func (m *Module) prepareProfile(c *gin.Context) *profile {
// mode for the target account profile, and serves that.
func (m *Module) profileGETHandler(c *gin.Context) {
p := m.prepareProfile(c)
if p == nil {
// Something went wrong,
// error already written.
return
}
// Choose desired web renderer for this acct.
switch wrm := p.account.WebLayout; wrm {