(m *types.Message)
| 25 | } |
| 26 | |
| 27 | func 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 | |
| 43 | func sendLink(ctx *ext.Context, u *ext.Update) error { |
| 44 | chatId := u.EffectiveChat().GetID() |