Skip to content

Commit

Permalink
fix: missing return value for adaptMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Nov 9, 2023
1 parent 329ac03 commit bef5718
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export async function adaptMessage(
payload.timestamp = data.time * 1000
payload.guild = guildId && { id: guildId }
payload.channel = channelId && { id: channelId, type: guildId ? Universal.Channel.Type.TEXT : Universal.Channel.Type.DIRECT }
return message
}

const decodeGuildChannelId = (data: OneBot.Message) => {
Expand Down
2 changes: 1 addition & 1 deletion src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class WsServer<C extends Context> extends Adapter<C, OneBotBot<C, OneBotB
public wsServer?: WebSocketLayer

constructor(ctx: C, bot: OneBotBot<C>) {
super()
super(ctx)

const { path = '/onebot' } = bot.config as WsServer.Config
this.wsServer = ctx.router.ws(path, (socket, { headers }) => {
Expand Down

0 comments on commit bef5718

Please sign in to comment.