Skip to content

Commit

Permalink
Add new StatusEmojiDisplayInfo interface and use that in the various …
Browse files Browse the repository at this point in the history
…user change events
  • Loading branch information
Filip Maj committed May 11, 2022
1 parent a85bb4b commit 832850a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/types/events/base-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,12 @@ export interface TokensRevokedEvent {

// NOTE: url_verification does not use the envelope, but its also not interesting for an app developer. its omitted.

export interface StatusEmojiDisplayInfo {
emoji_name?: string;
display_alias?: string;
display_url?: string;
}

export interface UserChangeEvent {
type: 'user_change';
user: {
Expand All @@ -885,7 +891,7 @@ export interface UserChangeEvent {
status_text: string;
status_text_canonical: string;
status_emoji: string;
status_emoji_display_info: [];
status_emoji_display_info: StatusEmojiDisplayInfo[];
status_expiration: number;
avatar_hash: string;
huddle_state?: string;
Expand Down Expand Up @@ -967,7 +973,7 @@ export interface UserHuddleChangedEvent {
status_text: string;
status_text_canonical: string;
status_emoji: string;
status_emoji_display_info: [];
status_emoji_display_info: StatusEmojiDisplayInfo[];
status_expiration: number;
avatar_hash: string;
huddle_state: string;
Expand Down Expand Up @@ -1049,7 +1055,7 @@ export interface UserProfileChangedEvent {
status_text: string;
status_text_canonical: string;
status_emoji: string;
status_emoji_display_info: [];
status_emoji_display_info: StatusEmojiDisplayInfo[];
status_expiration: number;
avatar_hash: string;
huddle_state: string;
Expand Down Expand Up @@ -1131,7 +1137,7 @@ export interface UserStatusChangedEvent {
status_text: string;
status_text_canonical: string;
status_emoji: string;
status_emoji_display_info: [],
status_emoji_display_info: StatusEmojiDisplayInfo[],
status_expiration: number;
avatar_hash: string;
first_name: string;
Expand Down

0 comments on commit 832850a

Please sign in to comment.