feat: support save content protect channel message by handle link

This commit is contained in:
krau
2025-02-16 11:38:26 +08:00
parent ec09289d5f
commit db69688722
6 changed files with 198 additions and 117 deletions

View File

@@ -10,6 +10,7 @@ type ReceivedFile struct {
ChatID int64 `gorm:"uniqueIndex:idx_chat_id_message_id;not null"`
MessageID int `gorm:"uniqueIndex:idx_chat_id_message_id;not null"`
ReplyMessageID int
ReplyChatID int64
FileName string
}

View File

@@ -37,13 +37,14 @@ type Task struct {
StoragePath string
StartTime time.Time
MessageID int
ChatID int64
FileMessageID int
FileChatID int64
ReplyMessageID int
ReplyChatID int64
}
func (t Task) String() string {
return fmt.Sprintf("[%d:%d]:%s", t.ChatID, t.MessageID, t.File.FileName)
return fmt.Sprintf("[%d:%d]:%s", t.FileChatID, t.FileMessageID, t.File.FileName)
}
func (t Task) FileName() string {