Help us shape the future of Go! Take the 2026 Go Developer Survey

telegramtopic

package
v1.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package telegramtopic maps forum topics in the administrators' Telegram group to what they carry. The bot mirrors its administrator surface into that group: one feed topic for operational notifications, one topic per website ticket, and one live-chat topic per bound panel user.

Index

Constants

View Source
const (
	KindNotify  = 1 // operations feed (order notifications, daily reports); ref_id 0
	KindTicket  = 2 // website ticket; ref_id is the ticket id
	KindSupport = 3 // live chat; ref_id is the panel user id
)

Topic kinds. The (chat_id, kind, ref_id) tuple is unique, as is the (chat_id, thread_id) tuple: one topic never carries two conversations.

View Source
const (
	StatusActive = 1
	StatusClosed = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Topic

type Topic struct {
	Id        int64     `gorm:"primaryKey"`
	ChatId    int64     `gorm:"type:bigint;not null;default:0;comment:Admin group chat id"`
	Kind      uint8     `gorm:"type:tinyint(1);not null;default:0;comment:1 notify 2 ticket 3 support"`
	RefId     int64     `gorm:"type:bigint;not null;default:0;comment:Ticket id / user id / 0"`
	ThreadId  int64     `gorm:"type:bigint;not null;default:0;comment:Forum topic message_thread_id"`
	Title     string    `gorm:"type:varchar(128);not null;default:'';comment:Topic title snapshot"`
	Status    uint8     `gorm:"type:tinyint(1);not null;default:1;comment:1 active 2 closed"`
	CreatedAt time.Time `gorm:"<-:create;comment:Create Time"`
	UpdatedAt time.Time `gorm:"comment:Update Time"`
}

func (Topic) TableName

func (Topic) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL