MCPcopy
hub / github.com/EverythingSuckz/TG-FileStreamBot / supportedMediaFilter

Function supportedMediaFilter

internal/commands/stream.go:27–41  ·  view source on GitHub ↗
(m *types.Message)

Source from the content-addressed store, hash-verified

25}
26
27func supportedMediaFilter(m *types.Message) (bool, error) {
28 if not := m.Media == nil; not {
29 return false, dispatcher.EndGroups
30 }
31 switch m.Media.(type) {
32 case *tg.MessageMediaDocument:
33 return true, nil
34 case *tg.MessageMediaPhoto:
35 return true, nil
36 case tg.MessageMediaClass:
37 return false, dispatcher.EndGroups
38 default:
39 return false, nil
40 }
41}
42
43func sendLink(ctx *ext.Context, u *ext.Update) error {
44 chatId := u.EffectiveChat().GetID()

Callers 1

sendLinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected