Skip to content

Commit

Permalink
Update X chat url (#5152)
Browse files Browse the repository at this point in the history
* Fix url.

* Remove console log.
  • Loading branch information
michelinewu authored Oct 7, 2024
1 parent 045cb8f commit 71e6473
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/services/platforms/twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export class TwitterPlatformService
};

readonly capabilities = new Set<TPlatformCapability>(['title', 'viewerCount']);
readonly apiBase = 'https://api.twitter.com/2';
readonly apiBase = 'https://api.x.com/2';
readonly domain = 'https://x.com';
readonly platform = 'twitter';
readonly displayName = 'X (Twitter)';
readonly gameImageSize = { width: 30, height: 40 };
Expand Down Expand Up @@ -209,9 +210,9 @@ export class TwitterPlatformService
}

get chatUrl() {
const broadcastId = this.state.broadcastId;
if (!broadcastId) return '';
return `https://twitter.com/i/broadcasts/${broadcastId}/chat`;
const username = this.userService.state.auth?.platforms?.twitter?.username;
if (!username) return '';
return `${this.domain}/${username}/chat`;
}

@mutation()
Expand All @@ -225,7 +226,7 @@ export class TwitterPlatformService
}

openStreamIneligibleHelp() {
const url = 'https://x.com/Live/status/1812291533162590577';
const url = `${this.domain}/Live/status/1812291533162590577`;
return remote.shell.openExternal(url);
}
}

0 comments on commit 71e6473

Please sign in to comment.