Skip to content

Commit

Permalink
fix: toBotMessageEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
mvayngrib committed Mar 10, 2018
1 parent 0e1f43d commit c6ccbfc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/bot/middleware/onmessagessaved.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,17 @@ export const toStreamAndProcess = (lambda:Lambda, opts?: any) => {

const toBotMessageEvent = ({ bot, user, message }):any => {
// identity permalink serves as user id
const payload = message.object
const type = payload[TYPE]
const { object } = message
const type = object[TYPE]
return {
bot,
user,
message,
payload,
payload: object,
object,
type,
link: payload._link,
permalink: payload._permalink,
link: object._link,
permalink: object._permalink,
}
}

Expand Down

0 comments on commit c6ccbfc

Please sign in to comment.