github.com/tada-team/tdproto@v1.51.57/server_chat_lastread.go (about) 1 package tdproto 2 3 func NewServerChatLastread(counters ChatCounters, teamUnread *TeamUnread, badge uint) (r ServerChatLastread) { 4 r.Name = r.GetName() 5 r.Params.Chats = []ChatCounters{counters} 6 r.Params.TeamUnread = teamUnread 7 r.Params.Badge = badge 8 return r 9 } 10 11 // Changed last read message in chat 12 type ServerChatLastread struct { 13 BaseEvent 14 Params serverChatLastreadParams `json:"params"` 15 } 16 17 func (p ServerChatLastread) GetName() string { return "server.chat.lastread" } 18 19 // Params of the server.chat.lastread event 20 type serverChatLastreadParams struct { 21 // Chat counters 22 Chats []ChatCounters `json:"chats"` 23 24 // Current team counters 25 TeamUnread *TeamUnread `json:"team_unread"` 26 27 // Total number of unreads 28 Badge uint `json:"badge"` 29 }