Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[BUG] IPostMessageReacted returns field named `isRemoved` instead of `isReacted`

Open Nabhag8848 opened this issue 3 years ago • 2 comments

Description:

  • AppsEngine have IPostMessageReacted, Handler for after a message get a reaction or a reaction got removed . has method executePostMessageReacted which takes one of the parameter of type IMessageReactionContext which includes isReacted field to know whether the emoji has been added or deleted. But everytime if we react with emoji in messages instead of having a boolean value in isReacted field, we are getting undefined regardless the operation we are making ( add or delete ).

  • Reason for having value as undefined everytime is from RocketChat, we are returning the field named isRemoved instead of isReacted. Have a look over here. But Expected field should have name isReacted as per the docs.

Steps to reproduce:

  1. Implement IPostMessageReacted in RocketChat App.
  2. log isReacted field in console.
  3. Deploy the app and React any message with emoji and check console.

OR

  • Set up this playground app to avoid the step 1 and follow rest of steps.

Expected behavior:

  • Instead of having undefined in isReacted we are expecting it to be boolean value as to know the emoji operation within message (add or delete).

Actual behavior:

  • As we can see, getting isReacted field as undefined isReactedField undefined

Note:

  • [x] willing to work on this.

Nabhag8848 avatar Dec 08 '22 18:12 Nabhag8848

Working on it🚀.

Nabhag8848 avatar Dec 08 '22 19:12 Nabhag8848

Thanks @Nabhag8848 ! That's a nice catch!

dudanogueira avatar Dec 14 '22 22:12 dudanogueira