hunk.code_window: import { config } from '@/config';
   const allowSiteList = ['mastodon.social', 'pawoo.net'];
   const mediaParse = (media_attachments) =>
       media_attachments
           .map((item) => {
               const selectedUrl = item.remote_url ?? item.url;
               const description = item.description ?? '';
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit: const apiHeaders = (site) => {
       const { accessToken, apiHost } = config.mastodon;
       // avoid sending API token to other sites
       return accessToken && site === apiHost ? { Authorization: `Bearer ${accessToken}` } : {};
   };
  
hunk.file_path: lib/routes/mastodon/utils.js
hunk.type: add
file: const cheerio = require('cheerio');
  const got = require('@/utils/got');
  
  module.exports = async (ctx) => {
      const username = ctx.params.username;
  
      const response = await got.get('https://gab.com/api/v1/account_by_username/' + username);
      const id = response.data.id;
      const gabs = await got.get(`https://gab.com/api/v1/accounts/${id}/statuses?exclude_replies=true`);
  
      const result = await Promise.all(
          gabs.data
              .filter((item) => !item.reblog)
              .map((item) => {
                  const media = item.media_attachments.map((item) => `<img src='${item.url}'>`).join('<br>');
                  const $ = cheerio.load(item.content);
  
                  return {
                      title: $.text() || 'Untitled',
                      description: item.content + (media && '<br>' + media),
                      link: item.url || `https://gab.com/${username}`,
                      pubDate: new Date(item.created_at).toISOString(),
                  };
              })
      );
  
      ctx.state.data = {
          title: `Gab - ${username}`,
          link: `https://gab.com/${username}`,
          item: result,
      };
  };
  