Skip to content

Commit

Permalink
feat: add thread unread
Browse files Browse the repository at this point in the history
  • Loading branch information
rusalexch committed Aug 16, 2023
1 parent 5891eda commit b17ec49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion codegen/typescript/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export interface TeamUnreadJSON {
group: UnreadJSON;
task: UnreadJSON;
meeting: UnreadJSON;
thread: UnreadJSON;
/* eslint-enable camelcase */
}
Expand All @@ -278,7 +279,8 @@ export class TeamUnread implements TDProtoClass<TeamUnread> {
public direct: Unread,
public group: Unread,
public task: Unread,
public meeting: Unread
public meeting: Unread,
public thread: Unread,
) {}
public static fromJSON (raw: TeamUnreadJSON): TeamUnread {
Expand All @@ -287,6 +289,7 @@ export class TeamUnread implements TDProtoClass<TeamUnread> {
Unread.fromJSON(raw.group),
Unread.fromJSON(raw.task),
Unread.fromJSON(raw.meeting),
Unread.fromJSON(raw.thread),
)
}
Expand All @@ -295,6 +298,7 @@ export class TeamUnread implements TDProtoClass<TeamUnread> {
'group',
'task',
'meeting',
'thread',
] as const
readonly #mapper = {
Expand All @@ -303,6 +307,7 @@ export class TeamUnread implements TDProtoClass<TeamUnread> {
group: () => ({ group: this.group.toJSON() }),
task: () => ({ task: this.task.toJSON() }),
meeting: () => ({ meeting: this.meeting.toJSON() }),
thread: () => ({ thread: this.thread.toJSON() }),
/* eslint-enable camelcase */
}
Expand Down

0 comments on commit b17ec49

Please sign in to comment.