Skip to content

Commit

Permalink
1.34.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfsdhgjkbmnmxc committed Jun 28, 2021
1 parent ce42cb4 commit cb462c7
Show file tree
Hide file tree
Showing 13 changed files with 128 additions and 15 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
v1.34.1
- tdapi.MyReactions
- tdapi.DevicePing
- tdapi.GroupMembers
- tdapi.MessageMarkup
- tdapi.TaskColors
- tdapi.ColorRule
- removed tdapi.GroupMember, use tdproto.GroupMembership instead

v1.34.0
- tdapi.upload.go and UploadFilter added
- tdapi.UploadFilter

v1.33.7
- Contact.can_import_tasks field
Expand Down
2 changes: 1 addition & 1 deletion chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ type GroupMembership struct {
Jid JID `json:"jid"`

// Status in group
Status GroupStatus `json:"status"`
Status GroupStatus `json:"status,omitempty"`

// Can I remove this member
CanRemove bool `json:"can_remove,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions color_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type ColorRule struct {
ColorIndex uint16 `json:"color_index"`

// Project filter enabled
SectionEnabled *bool `json:"section_enabled,omitempty"`
ProjectEnabled *bool `json:"section_enabled,omitempty"` // TODO: rename to "project_enabled

// Project id if project filter enabled
Section string `json:"section,omitempty"`
Project string `json:"section,omitempty"` // TODO: rename to "project"

// Tags filter enabled
TagsEnabled *bool `json:"tags_enabled,omitempty"`
Expand Down
7 changes: 7 additions & 0 deletions tdapi/background_action.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tdapi

// Background action (for example: Excel import) information
type BackgroundAction struct {
// Action uid
Action string `json:"action"`
}
40 changes: 40 additions & 0 deletions tdapi/color_rule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package tdapi

// Task color rule form
type ColorRule struct {
// Rule priority
Priority *int `json:"priority,omitempty"`

// Color index
ColorIndex *uint16 `json:"color_index,omitempty"`

// Rule description
Description string `json:"description"`

// Task status
TaskStatus *string `json:"task_status,omitempty"`

// Project filter enabled
ProjectEnabled bool `json:"section_enabled,omitempty"` // TODO: rename to "project_enabled"

// Project id if project filter enabled
Project *string `json:"section,omitempty"` // TODO: rename to "project"

// Task importance filter enabled
TaskImportanceEnabled bool `json:"task_importance_enabled,omitempty"`

// Task importance if task importance filter enabled
TaskImportance *int `json:"task_importance,omitempty"`

// Task urgency filter enabled
TaskUrgencyEnabled bool `json:"task_urgency_enabled,omitempty"`

// Task urgency if task urgency filter enabled
TaskUrgency *int `json:"task_urgency,omitempty"`

// Tags filter enabled
TagsEnabled bool `json:"tags_enabled,omitempty"`

// Tag ids if tags filter enabled
Tags *[]string `json:"tags,omitempty"`
}
7 changes: 7 additions & 0 deletions tdapi/device.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tdapi

// Device ping response
type DevicePing struct {
// Unique value sent to device
PingId string `json:"ping_id"`
}
8 changes: 4 additions & 4 deletions tdapi/draft.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ type Draft struct {
// Draft version
DraftGentime int64 `json:"draft_gentime,omitempty" tdproto:"readonly"`

// Links found in content
Links tdproto.MessageLinks `json:"links,omitempty" tdproto:"readonly"`

// TdMorkup found in content (links included)
// TdMarkup found in content (links included)
Markup []tdproto.MarkupEntity `json:"markup,omitempty" tdproto:"readonly"`

// Deprecated: use Markup instead
Links tdproto.MessageLinks `json:"links,omitempty" tdproto:"readonly"`
}
13 changes: 6 additions & 7 deletions tdapi/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ package tdapi

import "github.com/tada-team/tdproto"

type GroupMember struct {
// Member jid
Jid tdproto.JID `json:"jid"`

// Status: member or admin
Status tdproto.GroupStatus `json:"status,omitempty"`
// Group members
type GroupMembers struct {
// Group members lust
Members []tdproto.GroupMembership `json:"members"`
}

// Group form
type Group struct {
// Group title
DisplayName string `json:"display_name"`
Expand All @@ -33,7 +32,7 @@ type Group struct {
PinnedMessage string `json:"pinned_message"`

// Group members list
Members []GroupMember `json:"members"`
Members []tdproto.GroupMembership `json:"members"`

// Deprecated
Section string `json:"section"`
Expand Down
15 changes: 15 additions & 0 deletions tdapi/hotmessages.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package tdapi

import "github.com/tada-team/tdproto"

// All-in-one response with all messages info for fast chat rendering
type Hotmessages struct {
// chat information
Chat tdproto.Chat `json:"chat"`

// Messages list
Messages []tdproto.Message `json:"messages"`

// Contacts list
Contacts []tdproto.Contact `json:"contacts"`
}
9 changes: 9 additions & 0 deletions tdapi/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ type Message struct {
MessageUpdate
}

// Message markup with checked links
type MessageMarkup struct {
// Message markup
Markup []tdproto.MarkupEntity `json:"markup"`

// Deprecated: use markup instead
Links tdproto.MessageLinks `json:"links"`
}

// file upload:
// <form action="...?message_id=..." method="post" enctype="multipart/form-data">
// <input type="file" name="file">
Expand Down
12 changes: 12 additions & 0 deletions tdapi/my_reactions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tdapi

import "github.com/tada-team/tdproto"

// Reactions to messages: frequently used and all available
type MyReactions struct {
// My frequently used reactions
Top []tdproto.Reaction `json:"top"`

// All available reactions
All []tdproto.Reaction `json:"all"`
}
7 changes: 7 additions & 0 deletions tdapi/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,10 @@ type TaskFilter struct {
// gentime great than group/chat
GentimeGT int64 `schema:"gentime_gt"`
}

// Task cards colors
type TaskColors struct {
// Color list
Colors []tdproto.TaskColor `json:"colors"`
}

8 changes: 8 additions & 0 deletions tdapi/team.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package tdapi

import "github.com/tada-team/tdproto"

type Team struct {
// Team name
Name string `json:"name"`
Expand Down Expand Up @@ -34,3 +36,9 @@ type Team struct {
// Team pinned
Pinned bool `json:"pinned,omitempty"`
}

// Invitation information
type TeamPrejoinInfo struct {
// Short team information
Team tdproto.TeamShort `json:"team"`
}

0 comments on commit cb462c7

Please sign in to comment.