-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathmessages.go
38 lines (35 loc) · 1.21 KB
/
messages.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package mtproto
func (m *MTProto) MessagesGetHistory(peer TL, offsetId, offsetDate, addOffset, limit, maxId, minId int32) (*TL, error) {
return m.InvokeSync(TL_messages_getHistory{
Peer: peer,
Offset_id: offsetId,
Offset_date: offsetDate,
Add_offset: addOffset,
Limit: limit,
Max_id: maxId,
Min_id: minId,
})
}
func (m *MTProto) MessagesGetDialogs(excludePinned bool, offsetDate, offsetId int32, offsetPeer TL, limit int32) (*TL, error) {
return m.InvokeSync(TL_messages_getDialogs{
Exclude_pinned: excludePinned,
Offset_date: offsetDate,
Offset_id: offsetId,
Offset_peer: offsetPeer,
Limit: limit,
})
}
func (m *MTProto) MessagesSendMessage(no_webpage, silent, background, clear_draft bool, peer TL, reply_to_msg_id int32, message string, random_id int64, reply_markup TL, entities []TL) (*TL, error) {
return m.InvokeSync(TL_messages_sendMessage{
No_webpage: no_webpage,
Silent: silent,
Background: background,
Clear_draft: clear_draft,
Peer: peer,
Reply_to_msg_id: reply_to_msg_id,
Message: message,
Random_id: random_id,
Reply_markup: reply_markup,
Entities: entities,
})
}