Skip to content

Commit

Permalink
fix redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
ender-null committed May 7, 2024
1 parent a2f3898 commit ab99389
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ export class Bot {
if (!Array.isArray(broadcast.target)) {
config = bots[broadcast.target].config;
}
const ownerName = await getFullName(this, config.owner);
if (conversation.id === 'alerts') {
conversation.id = config.alertsConversationId;
conversation.title = await getFullName(this, config.alertsConversationId);
Expand All @@ -465,18 +466,19 @@ export class Bot {
conversation.title = await getFullName(this, config.adminConversationId);
} else if (conversation.id === 'owner') {
conversation.id = config.owner;
conversation.title = await getFullName(this, config.owner);
conversation.title = ownerName;
} else {
conversation.title = await getFullName(this, conversation.id);
}
const owner = new User(config.owner, ownerName);
const message: WSMessage = {
bot: broadcast.bot,
platform: broadcast.platform,
type: 'message',
message: new Message(
null,
conversation,
this.user,
json.type === 'broadcast' ? this.user : owner,
broadcast.message.content,
broadcast.message.type,
now(),
Expand Down

0 comments on commit ab99389

Please sign in to comment.