2023-11-27 11:24:47 +08:00
|
|
|
package forwarder
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/gotd/td/telegram/peers"
|
|
|
|
"github.com/gotd/td/tg"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Iter interface {
|
|
|
|
Next(ctx context.Context) bool
|
|
|
|
Value() Elem
|
|
|
|
Err() error
|
|
|
|
}
|
|
|
|
|
|
|
|
type Elem interface {
|
|
|
|
Mode() Mode
|
|
|
|
|
|
|
|
From() peers.Peer
|
|
|
|
Msg() *tg.Message
|
|
|
|
To() peers.Peer
|
2024-01-13 15:42:22 +08:00
|
|
|
Thread() int // reply to message/topic
|
2023-11-27 11:24:47 +08:00
|
|
|
|
|
|
|
AsSilent() bool
|
|
|
|
AsDryRun() bool
|
2024-02-09 15:46:06 +08:00
|
|
|
AsGrouped() bool // detect and forward grouped messages
|
2023-11-27 11:24:47 +08:00
|
|
|
}
|