all: add support for topics and refactor other things

This commit is contained in:
Tulir Asokan
2025-12-06 14:52:39 +02:00
parent 14b3b1fed7
commit d5f87d2ec1
26 changed files with 797 additions and 390 deletions
+7
View File
@@ -50,6 +50,7 @@ type GhostMetadata struct {
type PortalMetadata struct {
IsSuperGroup bool `json:"is_supergroup,omitempty"`
IsForumGeneral bool `json:"is_forum_general,omitempty"`
ReadUpTo int `json:"read_up_to,omitempty"`
AllowedReactions []string `json:"allowed_reactions"`
LastSync jsontime.Unix `json:"last_sync,omitempty"`
@@ -63,6 +64,12 @@ func (pm *PortalMetadata) SetIsSuperGroup(isSupergroup bool) (changed bool) {
return changed
}
func (pm *PortalMetadata) SetIsForumGeneral(isForumGeneral bool) (changed bool) {
changed = pm.IsForumGeneral != isForumGeneral
pm.IsForumGeneral = isForumGeneral
return changed
}
type MessageMetadata struct {
ContentHash []byte `json:"content_hash,omitempty"`
ContentURI id.ContentURIString `json:"content_uri,omitempty"`