Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfsdhgjkbmnmxc committed Jun 19, 2021
1 parent 13e0094 commit 4e7d63d
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v1.33.5
- tdapi.Contact, tdapi.Integration, tdapi.Team
- Contact.add_to_team_rights field removed
- Team.pinned field added
- PushDevice docs

v1.33.4
- features.min_corp_ios_version and features.min_corp_android_version

Expand Down
3 changes: 0 additions & 3 deletions contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ type Contact struct {
// Last activity in this team (iso datetime)
LastActivity ISODateTimeString `json:"last_activity,omitempty"`

// Can contact add users to this team
AddToTeamRights bool `json:"add_to_team_rights,omitempty"`

// Contact deleted
IsArchive bool `json:"is_archive,omitempty"`

Expand Down
30 changes: 23 additions & 7 deletions push_device.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
package tdproto

// Push device info
type PushDevice struct {
Type string `json:"type"`
DeviceId string `json:"device_id"`
NotificationToken string `json:"notification_token"`
// Type: android, ios, web, safari
Type string `json:"type"`

// Device id generated by client library
DeviceId string `json:"device_id"`

// Notification token
NotificationToken string `json:"notification_token"`

// Notification token for VOIP (iOS only)
VoipNotificationToken string `json:"voip_notification_token"`
AllowedNotifications bool `json:"allowed_notifications"` // deprecated
Name string `json:"name"`
DataPushes bool `json:"data_pushes"`
DataBadges bool `json:"data_badges"`

// Readable device name
Name string `json:"name"`

// Send silently data pushes that must be fully processed by app. Must be true for modern mobile clients
DataPushes bool `json:"data_pushes"`

// Send badge value as data. Experimental
DataBadges bool `json:"data_badges"`

// deprecated
AllowedNotifications bool `json:"allowed_notifications"`
}
96 changes: 96 additions & 0 deletions tdapi/contact.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package tdapi

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

// Contact invite/edit form
type Contact struct {
// User uid (for invitation from other team)
UserUid string `json:"user_uid,omitempty"`

// Phone number (for invitation by phone)
Phone string `json:"phone"`

// Contact phone number (part of contact information in team, visible by all)
ContactPhone string `json:"contact_phone"`

// Contact email (part of contact information in team, visible by all)
ContactEmail string `json:"contact_email"`

// Family name
FamilyName string `json:"family_name"`

// Given name
GivenName string `json:"given_name"`

// Patronymic
Patronymic string `json:"patronymic"`

// Role in team
Role string `json:"role"`

// Mood in team
Mood string `json:"mood"`

// Enable debug messages in UI
DebugShowActivity bool `json:"debug_show_activity"`

// Status in team
Status tdproto.TeamStatus `json:"status"`

// ContactSection uids, if any
Sections []string `json:"sections"`

// Use Ctrl/Cmd + Enter instead Enter
AltSend bool `json:"alt_send"`

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

// Send push notifications even contact is online
AlwaysSendPushes bool `json:"always_send_pushes"`

// Show unread chats first (web/desktop)
UnreadFirst bool `json:"unread_first"`

// Show unread chats first (mobile app)
MunreadFirst bool `json:"munread_first"`

// Default language code
DefaultLang string `json:"default_lang"`

// Timezone, if any
Timezone string `json:"timezone"`

// Start silently time (no pushes, no sounds)
QuietTimeStart string `json:"quiet_time_start"`

// Quiet time finish
QuietTimeFinish string `json:"quiet_time_finish"`

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

// Push notifications for task chats
TaskNotificationsEnabled bool `json:"task_notifications_enabled"`

// Short view in contact list
ContactShortView bool `json:"contact_short_view"`

// Short view in group list
GroupShortView bool `json:"group_short_view"`

// Short view in task list
TaskShortView bool `json:"task_short_view"`

// Short view in contact list in mobile app
ContactMshortView bool `json:"contact_mshort_view"`

// Show archived contacts in contact list
ContactShowArchived bool `json:"contact_show_archived"`

// Short view in group list in mobile app
GroupMshortView bool `json:"group_mshort_view"`

// Short view in task list in mobile app
TaskMshortView bool `json:"task_mshort_view"`
}
23 changes: 23 additions & 0 deletions tdapi/integration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package tdapi

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

type Integration struct {
// Enabled
Enabled bool `json:"enabled"`

// Optional commend
Comment string `json:"comment"`

// Plugin name
Kind string `json:"kind"`

// Group chat jid
GroupJid tdproto.JID `json:"group"`

// WebhookUrl, if any
WebhookUrl string `json:"webhook_url"`

// Integration form
IntegrationForm *tdproto.IntegrationForm `json:"form"`
}
36 changes: 36 additions & 0 deletions tdapi/team.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package tdapi

type Team struct {
// Team name
Name string `json:"name"`

// Default task deadline
DefaultTaskDeadline string `json:"default_task_deadline"`

// Max message update/deletion age, in seconds
MaxMessageUpdateAge interface{} `json:"max_message_update_age"`

// Patronymic in usernames for this team
UsePatronymic bool `json:"use_patronymic"`

// Use importance field in task
UseTaskImportance bool `json:"use_task_importance"`

// Use urgency field in task
UseTaskUrgency bool `json:"use_task_urgency"`

// Use complexity field in task
UseTaskComplexity bool `json:"use_task_complexity"`

// Use spent time field in task
UseTaskSpentTime bool `json:"use_task_spent_time"`

// Is singlegroup (for creation only)
SingleGroup bool `json:"single_group"`

// Contacts (for creation only)
Contacts []Contact `json:"contacts"`

// Team pinned
Pinned bool `json:"pinned,omitempty"`
}
3 changes: 3 additions & 0 deletions team.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ type Team struct {

// Don't show archived users by default
HideArchivedUsers bool `json:"hide_archived_users,omitempty"`

// Team pinned
Pinned bool `json:"pinned,omitempty"`
}

// Short team representation. For invites, push notifications, etc. Readonly.
Expand Down
2 changes: 1 addition & 1 deletion user.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type User struct {
QuietTimeFinish *string `json:"quiet_time_finish"`
}

// Accouint data with extra information
// Account data with extra information
type UserWithMe struct {
User

Expand Down

0 comments on commit 4e7d63d

Please sign in to comment.