backfill: implement

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-08-20 12:41:27 -06:00
parent 7e2d9bbc4e
commit 56f83315ed
9 changed files with 429 additions and 218 deletions
+5 -1
View File
@@ -87,7 +87,7 @@ func (tg *TelegramConnector) ValidateConfig() error {
func (tg *TelegramConnector) GetDBMetaTypes() database.MetaTypes {
return database.MetaTypes{
Ghost: func() any { return &GhostMetadata{} },
Portal: nil,
Portal: func() any { return &PortalMetadata{} },
Message: func() any { return &MessageMetadata{} },
Reaction: nil,
UserLogin: func() any { return &UserLoginMetadata{} },
@@ -99,6 +99,10 @@ type GhostMetadata struct {
IsBot bool `json:"is_bot,omitempty"`
}
type PortalMetadata struct {
IsSuperGroup bool `json:"is_supergroup,omitempty"`
}
type MessageMetadata struct {
ContentHash []byte `json:"content_hash,omitempty"`
ContentURI id.ContentURIString `json:"content_uri,omitempty"`