hunk.code_window:       content: command.contentType === 'editor' ? sanitizeMessageContent(command.content) : command.content,
         contentType: command.contentType,
         subject: command.subject,
         type: command.type,
         _organizationId: command.organizationId,
         _environmentId: command.environmentId,
         _creatorId: command.userId,
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit:       _feedId: command.feedId,
  
hunk.file_path: apps/api/src/app/message-template/usecases/create-message-template/create-message-template.usecase.ts
hunk.type: add
file: import { OrganizationEntity } from './organization.entity';
  import { BaseRepository } from '../base-repository';
  import { Organization } from './organization.schema';
  import { MemberRepository } from '../member';
  
  export class OrganizationRepository extends BaseRepository<OrganizationEntity> {
    private memberRepository = new MemberRepository();
  
    constructor() {
      super(Organization, OrganizationEntity);
    }
  
    async findUserActiveOrganizations(userId: string): Promise<OrganizationEntity[]> {
      const members = await this.memberRepository.findUserActiveMembers(userId);
  
      return await this.find({
        _id: members.map((member) => member._organizationId),
      });
    }
  
    async updateBrandingDetails(organizationId: string, branding: { color: string; logo: string }) {
      return this.update(
        {
          _id: organizationId,
        },
        {
          $set: {
            branding,
          },
        }
      );
    }
  }
  