You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rss.go
    path of file: ./repos/gotosocial/internal/processing/account
    
    the code of the file until where you have to start completion: // GoToSocial
// Copyright (C) GoToSocial Authors admin@gotosocial.org
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero
    
func (p *Processor) rssImageForAccount(ctx context.Context, account *gtsmodel.Account, author string) (*feeds.Image, gtserror.WithCode) {
	if account.AvatarMediaAttachmentID == "" {
		// No image, no problem!
		return nil, nil
	}

	// Ensure account avatar attachment populated.
	if account.AvatarMediaAttachment == nil {
		var err error
		account.AvatarMediaAttachment, err = p.state.DB.GetAttachmentByID(ctx, account.AvatarMediaAttachmentID)
		if err != nil {
			if errors.Is(err, db.ErrNoEntries) {
				// No attachment found with this ID (race condition?).
				return nil, nil
			}

			// Real db error.
			err = gtserror.Newf("db error fetching avatar media attachment: %w", err)
			return nil, gtserror.NewErrorInternalError(err)
		}
	}

	return &feeds.Image{
		Url:   account.AvatarMediaAttachment.Thumbnail.URL,
		Title: "Avatar for " + author,
		Link:  account.URL,
	}, nil
}