Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Usernames in Request at Outgoing Webhook for Direct Messages #322

Closed
0ndifined opened this issue Apr 23, 2018 · 1 comment
Closed

No Usernames in Request at Outgoing Webhook for Direct Messages #322

0ndifined opened this issue Apr 23, 2018 · 1 comment

Comments

@0ndifined
Copy link

This issue extends this issue: RocketChat#10416

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:

	room: {
		_id: 'TAQvbQBejX3HDEcKQzyaX5AbGaA9bH7APu',
		_updatedAt: 2018 - 04 - 20T08: 17: 15.092Z,
		t: 'd',
		msgs: 18,
		ts: 2018 - 04 - 11T08: 17: 22.471Z,
		lm: 2018 - 04 - 20T08: 17: 15.031Z,
		username: 'myUser',
		usernames: ['**this_will_be_filled_in_with_usernames_when_replayed**']
	},
	siteUrl: 'https://myURL'

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.

This is a problem specific to the Assistify fork. The problem probably is created at the handling of the usernames in the room object in the response. The data is build here:

Rocket.Chat/packages/rocketchat-integrations/server/lib/triggerHandler.js

@graywolf336
Copy link

Will be closed by: RocketChat#10576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants