-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
I'm trying to create a webhook that sends a notification when a direct message has been written to a specified user. For that, I want to add a script that just checks whether the direct message is sent to the specified user. Unfortunately, the username of the user who receives the message is not part of the request that I can access in the script. The request only consists of this:
{ _id: 'TAQvbQBejX3HDEcKQzyaX5AbGaA9bH7APu', _updatedAt: 2018 - 04 - 11T08: 44: 35.812Z, t: 'd', msgs: 16, ts: 2018 - 04 - 11T08: 17: 22.471Z, username: 'assistify.admin', lm: 2018 - 04 - 11T08: 44: 35.805Z, usernames: ['this_will_be_filled_in_with_usernames_when_replayed'] }
So the array for the usernames is not filled but only show this info-string "this_will_be_filled_in_with_usernames_when_replayed". It should actually contain the list of users in that room. Also, replaying the outgoing webhook event doesn't help.