<commit_before>package models

import (
	"socialapi/request"

	"github.com/koding/bongo"
)

type ChannelMessageContainer struct {
	Message      *ChannelMessage                  `json:"message"`
	Interactions map[string]*InteractionContainer `json:"interactions"`
	RepliesCount int                              `json:"repliesCount"`
	// Replies should stay as   ChannelMessageContainers
	// not as a pointer
	Replies            ChannelMessageContainers `json:"replies"`
	AccountOldId       string                   `json:"accountOldId"`
	IsFollowed         bool                     `json:"isFollowed"`
	UnreadRepliesCount int                      `json:"unreadRepliesCount,omitempty"`
	Err                error                    `json:"-"`
}

// Tests are done.
func NewChannelMessageContainer() *ChannelMessageContainer {
	container := &ChannelMessageContainer{}
	container.Interactions = make(map[string]*InteractionContainer)
	container.Interactions["like"] = NewInteractionContainer()

	return container
}

type InteractionContainer struct {
	IsInteracted  bool     `json:"isInteracted"`
	ActorsPreview []string `json:"actorsPreview"`
	ActorsCount   int      `json:"actorsCount"`
}<commit_msg>Socialapi: added parent if for posts of replies<commit_after>package models

import (
	"socialapi/request"

	"github.com/koding/bongo"
)

type ChannelMessageContainer struct {
	Message      *ChannelMessage                  `json:"message"`
	Interactions map[string]*InteractionContainer `json:"interactions"`
	RepliesCount int                              `json:"repliesCount"`
	// Replies should stay as   ChannelMessageContainers
	// not as a pointer
	Replies            ChannelMessageContainers `json:"replies"`
	AccountOldId       string                   `json:"accountOldId"`
	IsFollowed         bool                     `json:"isFollowed"`
	UnreadRepliesCount int                      `json:"unreadRepliesCount,omitempty"`
	ParentID           int64                    `json:"parentId,omitempty"`
	Err                error                    `json:"-"`
}

// Tests are done.
func NewChannelMessageContainer() *ChannelMessageContainer {
	container := &ChannelMessageContainer{}
	container.Interactions = make(map[string]*InteractionContainer)
	container.Interactions["like"] = NewInteractionContainer()

	return container
}

type InteractionContainer struct {
	IsInteracted  bool     `json:"isInteracted"`
	ActorsPreview []string `json:"actorsPreview"`
	ActorsCount   int      `json:"actorsCount"`
}
{'fraction_non_alphanumeric': 0.09236305477808876, 'fraction_numerical': 0.0007996801279488205, 'mean_word_length': 2.8790697674418606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '365826', 'n_tokens_mistral': 666, 'n_tokens_neox': 648, 'n_words': 144}