Skip to content

Commit

Permalink
DND features
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfsdhgjkbmnmxc committed Aug 3, 2021
1 parent 849fe88 commit f0c7344
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v.1.39.0
- Experimental DND features: editable Contact.dnd_until field, readonly OnlineContact.dnd field

v.1.38.2
- Contact.gentime / ShortContact.gentime

Expand Down
3 changes: 3 additions & 0 deletions contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ type Contact struct {
// Quiet time finish
QuietTimeFinish *string `json:"quiet_time_finish,omitempty"`

// DND mode enabled until
DndUntil ISODateTimeString `json:"dnd_until,omitempty"`

// Push notifications for group chats
GroupNotificationsEnabled *bool `json:"group_notifications_enabled,omitempty"`

Expand Down
3 changes: 3 additions & 0 deletions server_online.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ type OnlineContact struct {
// Is away from keyboard
Afk bool `json:"afk,omitempty"`

// DND mode enabled
Dnd bool `json:"dnd,omitempty"`

// Is mobile client
Mobile bool `json:"mobile"` // TODO: omitempty. 17feb2020
}
Expand Down
3 changes: 3 additions & 0 deletions tdapi/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ type Contact struct {
// Use Ctrl/Cmd + Enter instead Enter
AltSend bool `json:"alt_send"`

// DND mode enabled until
DndUntil tdproto.ISODateTimeString `json:"dnd_until"`

// Use * as @ for mentions
AsteriskMention bool `json:"asterisk_mention"`

Expand Down

0 comments on commit f0c7344

Please sign in to comment.