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] Email message forward error #7846

Merged
merged 1 commit into from
Aug 23, 2017
Merged

Conversation

rodrigok
Copy link
Member

Closes #6179 #5797
Closes #7245

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-7846 August 23, 2017 13:11 Inactive
@rodrigok rodrigok added this to the 0.59.0 milestone Aug 23, 2017
@rodrigok rodrigok merged commit 6ac6d74 into develop Aug 23, 2017
@localguru
Copy link
Contributor

Hi,

just backpor'ted this fix to 0.58.2, but still get errors:

Sep  8 22:18:52 testchatserv testchat[2594]: #033[34mMeteor ➔ method#033[39m mailMessages -> userId: Vr3FsLj7VgcjdT73x , arguments:  { '0':
Sep  8 22:18:52 testchatserv testchat[2594]:    { rid: '4nkSW4zucCtNTYAms',
Sep  8 22:18:52 testchatserv testchat[2594]:      to_users: [],
Sep  8 22:18:52 testchatserv testchat[2594]:      to_emails: 'marcus@xxx.de',
Sep  8 22:18:52 testchatserv testchat[2594]:      subject: 'Hier ist ein ausgewählter Teil aus xxxx Nachrichten',
Sep  8 22:18:52 testchatserv testchat[2594]:      messages: [ 'BrNcbffhaFidWGfY7' ],
Sep  8 22:18:52 testchatserv testchat[2594]:      language: 'de' } }
Sep  8 22:18:52 testchatserv testchat[2594]: #033[34mMeteor ➔ method#033[39m canAccessRoom -> userId: Vr3FsLj7VgcjdT73x , arguments:  { '0': '4nkSW4zucCtNTYAms', '1': 'Vr3FsLj7VgcjdT73x' }
Sep  8 22:18:52 testchatserv testchat[2594]: Sending messages to e-mails:  [ 'marcus@xxx.xx' ]
Sep  8 22:18:52 testchatserv testchat[2594]: #033[34mMeteor ➔ method#033[39m loadLocale -> userId: Vr3FsLj7VgcjdT73x , arguments:  { '0': 'de' }
Sep  8 22:18:52 testchatserv testchat[2594]: Exception while invoking method 'mailMessages' TypeError: Cannot read property 'defineLocale' of undefined
Sep  8 22:18:52 testchatserv testchat[2594]:   at eval (<anonymous>:30:20)
Sep  8 22:18:52 testchatserv testchat[2594]:   at format.m (<anonymous>:12:4)
Sep  8 22:18:52 testchatserv testchat[2594]:   at eval (<anonymous>:13:2)
Sep  8 22:18:52 testchatserv testchat[2594]:   at [object Object].Meteor.methods.mailMessages (/home/testchat/test/programs/server/packages/rocketchat_channel-settings-mail-messages.js:124:23)
Sep  8 22:18:52 testchatserv testchat[2594]:   at [object Object].methodsMap.(anonymous function) (/home/testchat/test/programs/server/packages/rocketchat_lib.js:1110:26)
Sep  8 22:18:52 testchatserv testchat[2594]:   at [object Object].methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30)
Sep  8 22:18:52 testchatserv testchat[2594]:   at maybeAuditArgumentChecks (/home/testchat/test/programs/server/packages/ddp-server.js:1858:12)
Sep  8 22:18:52 testchatserv testchat[2594]:   at /home/testchat/test/programs/server/packages/ddp-server.js:904:20
Sep  8 22:18:52 testchatserv testchat[2594]:   at [object Object]._.extend.withValue (packages/meteor.js:1126:17)
Sep  8 22:18:52 testchatserv testchat[2594]:   at /home/testchat/test/programs/server/packages/ddp-server.js:903:47
Sep  8 22:18:52 testchatserv testchat[2594]:   at [object Object]._.extend.withValue (packages/meteor.js:1126:17)
Sep  8 22:18:52 testchatserv testchat[2594]:   at /home/testchat/test/programs/server/packages/ddp-server.js:902:46
Sep  8 22:18:52 testchatserv testchat[2594]:   at [object Object]._.extend.protocol_handlers.method (../programs/server/packages/ddp-server.js:875:21)
Sep  8 22:18:52 testchatserv testchat[2594]:   at /home/testchat/test/programs/server/packages/ddp-server.js:754:85

My "fix" is just

+		//if (data.language !== 'en') {
+		//	const localeFn = Meteor.call('loadLocale', data.language);
+		//	if (localeFn) {
+		//		Function(localeFn)({moment});
+		//		moment.locale(data.language);
+		//	}
+		//}

Ciao
Marcus

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.

E-Mail message forward throws exception
4 participants