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

[FIX] Messages can't be quoted sometimes #9720

Merged
merged 2 commits into from
Feb 14, 2018

Conversation

geekgonecrazy
Copy link
Contributor

@RocketChat/core

If you tried to quote a message sent by:

  • integration
  • anything that touched: processWebHookMessage (so both message sending endpoints)

and those messages didn't have attachments and the attachment property was null... you'd get this exception:

TypeError: Cannot read property 'map' of null
    at recursiveRemove (/app/bundle/programs/server/packages/rocketchat_oembed.js:589:24)
    at msg.urls.forEach.item (/app/bundle/programs/server/packages/rocketchat_oembed.js:609:29)
    at Array.forEach (<anonymous>:null:null)
    at RocketChat.callbacks.add.msg (/app/bundle/programs/server/packages/rocketchat_oembed.js:600:12)
    at /app/bundle/programs/server/packages/rocketchat_lib.js:1157:27
    at Array.reduce (<anonymous>:null:null)
    at Object.RocketChat.callbacks.run (/app/bundle/programs/server/packages/rocketchat_lib.js:1150:6)
    at EventEmitter.RocketChat.sendMessage (/app/bundle/programs/server/packages/rocketchat_lib.js:5158:33)
    at DDPCommon.MethodInvocation.sendMessage (/app/bundle/programs/server/packages/rocketchat_lib.js:15419:21)
    at DDPCommon.MethodInvocation.methodsMap.(anonymous function) (/app/bundle/programs/server/packages/rocketchat_lib.js:2134:26)
    at DDPCommon.MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30)
    at maybeAuditArgumentChecks (/app/bundle/programs/server/packages/ddp-server.js:1826:12)
    at DDP._CurrentMethodInvocation.withValue (/app/bundle/programs/server/packages/ddp-server.js:892:126)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at DDPServer._CurrentWriteFence.withValue (/app/bundle/programs/server/packages/ddp-server.js:892:98)
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15)
    at Promise (/app/bundle/programs/server/packages/ddp-server.js:892:46)
    at new Promise (<anonymous>:null:null)
    at Session.method (/app/bundle/programs/server/packages/ddp-server.js:865:23)
    at /app/bundle/programs/server/packages/ddp-server.js:744:85

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9720 February 14, 2018 22:23 Inactive
@geekgonecrazy
Copy link
Contributor Author

@rodrigok if we put out a 0.61.1 could we get this included. If not for sure needs to be in 0.62.0 long time annoying bug

@geekgonecrazy geekgonecrazy changed the title [Fix] Quoting message from integration breaking [Fix] Quoting message from integration keeping message from sending Feb 14, 2018
@rodrigok rodrigok changed the title [Fix] Quoting message from integration keeping message from sending [FIX] Messages can't be quoted some times Feb 14, 2018
@rodrigok rodrigok changed the title [FIX] Messages can't be quoted some times [FIX] Messages can't be quoted sometimes Feb 14, 2018
@rodrigok rodrigok merged commit 5375536 into develop Feb 14, 2018
@rodrigok rodrigok deleted the fix/quoting-integration-message-breaking branch February 14, 2018 22:57
rodrigok added a commit that referenced this pull request Feb 14, 2018
…age-breaking

[FIX] Messages can't be quoted sometimes
@sampaiodiego
Copy link
Member

sampaiodiego commented Feb 15, 2018

yay.. you found it! awesome 🎉

@geekgonecrazy
Copy link
Contributor Author

😁 I took a peek in the db and then it made sense once I saw attachments: null

@rodrigok rodrigok mentioned this pull request Feb 28, 2018
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

Successfully merging this pull request may close these issues.

4 participants