github.com/tada-team/tdproto@v1.51.57/tdapi/message.go (about) 1 package tdapi 2 3 import "github.com/tada-team/tdproto" 4 5 type MessageFilter struct { 6 UserParams 7 Paginator 8 9 // ?chat=jid,jid 10 Chat string `schema:"chat"` 11 12 // ?chat_type=task,group,direct|any (default: any) 13 ChatType string `schema:"chat_type"` 14 15 // ?sender=jid,jid 16 Sender string `schema:"sender"` 17 18 // ?has_upload=true|false|any (default: any) 19 HasUpload string `schema:"has_upload"` 20 21 // ?text=substr 22 Text string `schema:"text"` 23 24 // ?type=image,video,plain,file 25 Type tdproto.Mediatype `schema:"type"` 26 27 // ?important=true|any 28 Important string `schema:"important"` 29 30 // ?date_from=dt (include) 31 DateFrom string `schema:"date_from"` 32 33 // ?date_to=dt 34 DateTo string `schema:"date_to"` 35 36 // ?include_deleted=true|false (default: false) 37 IncludeDeleted string `schema:"include_deleted"` 38 39 // ?gentime_from= 40 GentimeFrom string `schema:"gentime_from"` 41 42 // ?exact=msgId 43 Exact string `schema:"exact"` 44 45 // ?unread=(true|false) 46 Unread string `schema:"unread"` 47 48 // ?old_from=msgId (exclude msgId) 49 OldFrom string `schema:"old_from"` 50 51 // ?new_from=msgId (exclude msgId) 52 NewFrom string `schema:"new_from"` 53 54 // ?old_from_inc=msgId (include msgId) 55 OldFromInc string `schema:"old_from_inc"` 56 57 // ?new_from_inc=msgId (include msgId) 58 NewFromInc string `schema:"new_from_inc"` 59 60 // ?around=msgId (include msgId) 61 Around string `schema:"around"` 62 } 63 64 type MessageUpdate struct { 65 // Important flag. Not required. Default: false 66 Important bool `json:"important,omitempty"` 67 68 // Disable links preview generation. Not required. Default: false 69 Nopreview bool `json:"nopreview,omitempty"` 70 71 // Draft message, send later 72 SendAt string `json:"send_at,omitempty"` 73 } 74 75 type Message struct { 76 // Message type 77 Type tdproto.Mediatype `json:"type"` 78 79 // Message text 80 Text string `json:"text"` 81 82 // Message id 83 MessageUid string `json:"message_id,omitempty"` 84 85 // Forwarded messages 86 LinkedMessages []string `json:"linked_messages,omitempty"` 87 88 // Message attachments 89 Uploads []string `json:"uploads,omitempty"` 90 91 // Backward compatibility mode 92 OldStyleAttachment bool `json:"old_style_attachment,omitempty"` 93 94 MessageUpdate 95 } 96 97 // Message markup with checked links 98 type MessageMarkup struct { 99 // Message markup 100 Markup []tdproto.MarkupEntity `json:"markup"` 101 102 // Deprecated: use markup instead 103 Links tdproto.MessageLinks `json:"links"` 104 } 105 106 // file upload: 107 // <form action="...?message_id=..." method="post" enctype="multipart/form-data"> 108 // <input type="file" name="file"> 109 // </form>