{{_ "This_conversation_is_already_closed"}}
3 | 4 | -------------------------------------------------------------------------------- /packages/rocketchat-livechat/server/api.js: -------------------------------------------------------------------------------- 1 | import '../imports/server/rest/departments.js'; 2 | import '../imports/server/rest/sms.js'; 3 | import '../imports/server/rest/users.js'; 4 | -------------------------------------------------------------------------------- /packages/rocketchat-slashcommands-invite/client.js: -------------------------------------------------------------------------------- 1 | RocketChat.slashCommands.add('invite', undefined, { 2 | description: 'Invite_user_to_join_channel', 3 | params: '@username' 4 | }); 5 | -------------------------------------------------------------------------------- /packages/rocketchat-slashcommands-msg/client.js: -------------------------------------------------------------------------------- 1 | RocketChat.slashCommands.add('msg', undefined, { 2 | description: 'Direct_message_someone', 3 | params: '@username{{step}}
4 |{{completed}} / {{total}}
5 | 6 | -------------------------------------------------------------------------------- /packages/rocketchat-livechat/app/client/views/avatar.html: -------------------------------------------------------------------------------- 1 | 2 |{{_ "Nothing_found"}}.
6 | 7 | -------------------------------------------------------------------------------- /private/node_scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "async": "^2.0.0-rc.3", 4 | "fs": "0.0.2", 5 | "google-translate": "^1.0.6", 6 | "recursive-readdir": "^2.0.0", 7 | "underscore": "^1.8.3" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/rocketchat-lib/server/functions/checkEmailAvailability.js: -------------------------------------------------------------------------------- 1 | RocketChat.checkEmailAvailability = function(email) { 2 | return !Meteor.users.findOne({ 'emails.address': { $regex : new RegExp(`^${ s.trim(s.escapeRegExp(email)) }$`, 'i') } }); 3 | }; 4 | -------------------------------------------------------------------------------- /server/startup/migrations/v078.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 78, 3 | up() { 4 | RocketChat.models.Permissions.update({ _id: { $in: ['create-c', 'create-d', 'create-p'] }}, { $addToSet: { roles: 'bot' }}, { multi: true }); 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /packages/rocketchat-custom-sounds/admin/startup.js: -------------------------------------------------------------------------------- 1 | RocketChat.AdminBox.addOption({ 2 | href: 'custom-sounds', 3 | i18nLabel: 'Custom_Sounds', 4 | permissionGranted() { 5 | return RocketChat.authz.hasAtLeastOnePermission(['manage-sounds']); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /packages/rocketchat-emoji-custom/admin/startup.js: -------------------------------------------------------------------------------- 1 | RocketChat.AdminBox.addOption({ 2 | href: 'emoji-custom', 3 | i18nLabel: 'Custom_Emoji', 4 | permissionGranted() { 5 | return RocketChat.authz.hasAtLeastOnePermission(['manage-emoji']); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /packages/rocketchat-slackbridge/logger.js: -------------------------------------------------------------------------------- 1 | /* globals logger:true */ 2 | /* exported logger */ 3 | 4 | logger = new Logger('SlackBridge', { 5 | sections: { 6 | connection: 'Connection', 7 | events: 'Events', 8 | class: 'Class' 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /server/startup/migrations/v013.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 13, 3 | up() { 4 | // Set all current users as active 5 | RocketChat.models.Users.setAllUsersActive(true); 6 | return console.log('Set all users as active'); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /.travis/namefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | set -euvo pipefail 4 | IFS=$'\n\t' 5 | 6 | FILENAME="$ROCKET_DEPLOY_DIR/rocket.chat-$ARTIFACT_NAME.tgz"; 7 | 8 | ln -s /tmp/build/Rocket.Chat.tar.gz "$FILENAME" 9 | gpg --armor --detach-sign "$FILENAME" 10 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Issues 2 | 3 | Please report any security issues you discovered to security[at]rocket[dot]chat 4 | 5 | We will assess the risk, plus make a fix available before we create a GitHub issue. 6 | 7 | Thank you for your contribution. 8 | -------------------------------------------------------------------------------- /packages/rocketchat-emoji-custom/client/models/EmojiCustom.js: -------------------------------------------------------------------------------- 1 | class EmojiCustom extends RocketChat.models._Base { 2 | constructor() { 3 | super(); 4 | this._initModel('custom_emoji'); 5 | } 6 | } 7 | 8 | RocketChat.models.EmojiCustom = new EmojiCustom(); 9 | -------------------------------------------------------------------------------- /packages/rocketchat-favico/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | name: 'rocketchat:favico', 3 | version: '0.0.1', 4 | summary: 'Favico.js for Rocket.Chat' 5 | }); 6 | 7 | Package.onUse(function(api) { 8 | api.addFiles('favico.js', 'client'); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/rocketchat-file-upload/ufs/GoogleStorage/client.js: -------------------------------------------------------------------------------- 1 | import {UploadFS} from 'meteor/jalik:ufs'; 2 | 3 | export class GoogleStorageStore extends UploadFS.Store {} 4 | 5 | // Add store to UFS namespace 6 | UploadFS.store.GoogleStorage = GoogleStorageStore; 7 | -------------------------------------------------------------------------------- /packages/rocketchat-integrations/server/logger.js: -------------------------------------------------------------------------------- 1 | /* globals logger:true */ 2 | /* exported logger */ 3 | 4 | logger = new Logger('Integrations', { 5 | sections: { 6 | incoming: 'Incoming WebHook', 7 | outgoing: 'Outgoing WebHook' 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /packages/rocketchat-lib/server/methods/checkRegistrationSecretURL.js: -------------------------------------------------------------------------------- 1 | Meteor.methods({ 2 | checkRegistrationSecretURL(hash) { 3 | 4 | check(hash, String); 5 | 6 | return hash === RocketChat.settings.get('Accounts_RegistrationForm_SecretURL'); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /packages/rocketchat-ui-login/client/login/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /.travis/setupsig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | set -euvo pipefail 4 | IFS=$'\n\t' 5 | 6 | cp .travis/sign.key.gpg /tmp 7 | gpg --yes --batch --passphrase=$mypass /tmp/sign.key.gpg 8 | gpg --allow-secret-key-import --import /tmp/sign.key 9 | rm /tmp/sign.key 10 | -------------------------------------------------------------------------------- /packages/rocketchat-custom-sounds/client/models/CustomSounds.js: -------------------------------------------------------------------------------- 1 | class CustomSounds extends RocketChat.models._Base { 2 | constructor() { 3 | super(); 4 | this._initModel('custom_sounds'); 5 | } 6 | } 7 | 8 | RocketChat.models.CustomSounds = new CustomSounds(); 9 | -------------------------------------------------------------------------------- /packages/rocketchat-oauth2-server-config/admin/client/startup.js: -------------------------------------------------------------------------------- 1 | RocketChat.AdminBox.addOption({ 2 | href: 'admin-oauth-apps', 3 | i18nLabel: 'OAuth Apps', 4 | permissionGranted() { 5 | return RocketChat.authz.hasAllPermission('manage-oauth-apps'); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /packages/rocketchat-ui-login/client/username/layout.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{_ "Powered_by"}}
4 |
5 |
6 |
7 |
{{_ "Nothing_found"}}.
6 | 7 | -------------------------------------------------------------------------------- /packages/rocketchat-ui/client/views/cmsPage.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /server/startup/migrations/v043.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 43, 3 | up() { 4 | if (RocketChat && RocketChat.models && RocketChat.models.Permissions) { 5 | RocketChat.models.Permissions.update({ _id: 'pin-message' }, { $addToSet: { roles: 'admin' } }); 6 | } 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /server/startup/migrations/v096.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 96, 3 | up() { 4 | if (RocketChat && RocketChat.models && RocketChat.models.Settings) { 5 | RocketChat.models.Settings.update({ _id: 'InternalHubot_ScriptsToLoad' }, { $set: { value: '' } }); 6 | } 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /client/methods/openRoom.js: -------------------------------------------------------------------------------- 1 | Meteor.methods({ 2 | openRoom(rid) { 3 | if (!Meteor.userId()) { 4 | return false; 5 | } 6 | 7 | ChatSubscription.update({ 8 | rid, 9 | 'u._id': Meteor.userId() 10 | }, { 11 | $set: { 12 | open: true 13 | } 14 | }); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /packages/rocketchat-authorization/client/startup.js: -------------------------------------------------------------------------------- 1 | Meteor.subscribe('roles'); 2 | 3 | RocketChat.AdminBox.addOption({ 4 | href: 'admin-permissions', 5 | i18nLabel: 'Permissions', 6 | permissionGranted() { 7 | return RocketChat.authz.hasAllPermission('access-permissions'); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /packages/rocketchat-autolinker/.npm/package/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "autolinker": { 4 | "version": "1.4.0", 5 | "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.4.0.tgz", 6 | "from": "autolinker@1.4.0" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /server/startup/migrations/v023.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 23, 3 | up() { 4 | RocketChat.models.Settings.remove({ 5 | _id: 'Accounts_denyUnverifiedEmails' 6 | }); 7 | 8 | return console.log('Deleting not used setting Accounts_denyUnverifiedEmails'); 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /server/startup/migrations/v046.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 46, 3 | up() { 4 | if (RocketChat && RocketChat.models && RocketChat.models.Users) { 5 | RocketChat.models.Users.update({ type: { $exists: false } }, { $set: { type: 'user' } }, { multi: true }); 6 | } 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /server/startup/migrations/v098.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 98, 3 | up() { 4 | RocketChat.models.OAuthApps.update({ _id: 'zapier' }, { 5 | $set: { 6 | redirectUri: 'https://zapier.com/dashboard/auth/oauth/return/RocketChatDevAPI/' 7 | } 8 | }); 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /.sandstorm/description.md: -------------------------------------------------------------------------------- 1 | The Complete Open Source Chat Solution. Rocket.Chat is a Web Chat Server, developed in JavaScript. It is a great solution for communities and companies wanting to privately host their own chat service or for developers looking forward to build and evolve their own chat platforms. 2 | -------------------------------------------------------------------------------- /client/methods/toggleFavorite.js: -------------------------------------------------------------------------------- 1 | Meteor.methods({ 2 | toggleFavorite(rid, f) { 3 | if (!Meteor.userId()) { 4 | return false; 5 | } 6 | 7 | ChatSubscription.update({ 8 | rid, 9 | 'u._id': Meteor.userId() 10 | }, { 11 | $set: { 12 | f 13 | } 14 | }); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /packages/rocketchat-emoji-custom/admin/emojiPreview.html: -------------------------------------------------------------------------------- 1 | 2 |{{_ "You_are_not_authorized_to_view_this_page"}}
4 | {{else}} 5 | 8 | {{/unless}} 9 | -------------------------------------------------------------------------------- /packages/rocketchat-ui-master/client/error.html: -------------------------------------------------------------------------------- 1 | 2 |3 | 10 |11 | 12 | -------------------------------------------------------------------------------- /packages/rocketchat-livechat/server/methods/sendMessageLivechat.js: -------------------------------------------------------------------------------- 1 | Meteor.methods({ 2 | sendMessageLivechat(message) { 3 | check(message.rid, String); 4 | check(message.token, String); 5 | 6 | const guest = Meteor.users.findOne(Meteor.userId(), { 7 | fields: { 8 | name: 1, 9 | username: 1, 10 | department: 1 11 | } 12 | }); 13 | 14 | return RocketChat.Livechat.sendMessage({ guest, message }); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /packages/rocketchat-slashcommands-join/client.js: -------------------------------------------------------------------------------- 1 | RocketChat.slashCommands.add('join', undefined, { 2 | description: 'Join_the_given_channel', 3 | params: '#channel' 4 | }, function(err, result, params) { 5 | if (err.error === 'error-user-already-in-room') { 6 | params.cmd = 'open'; 7 | params.msg.msg = params.msg.msg.replace('join', 'open'); 8 | return RocketChat.slashCommands.run('open', params.params, params.msg); 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /server/startup/migrations/v072.js: -------------------------------------------------------------------------------- 1 | RocketChat.Migrations.add({ 2 | version: 72, 3 | up() { 4 | RocketChat.models.Users.find({ type: 'visitor', 'emails.address': { $exists: true } }, { emails: 1 }).forEach(function(visitor) { 5 | RocketChat.models.Users.update({ _id: visitor._id }, { 6 | $set: { 7 | visitorEmails: visitor.emails 8 | }, 9 | $unset: { 10 | emails: 1 11 | } 12 | }); 13 | }); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /packages/rocketchat-api/server/default/info.js: -------------------------------------------------------------------------------- 1 | RocketChat.API.default.addRoute('info', { authRequired: false }, { 2 | get() { 3 | const user = this.getLoggedInUser(); 4 | 5 | if (user && RocketChat.authz.hasRole(user._id, 'admin')) { 6 | return RocketChat.API.v1.success({ 7 | info: RocketChat.Info 8 | }); 9 | } 10 | 11 | return RocketChat.API.v1.success({ 12 | version: RocketChat.Info.version 13 | }); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /packages/rocketchat-api/server/v1/helpers/isUserFromParams.js: -------------------------------------------------------------------------------- 1 | RocketChat.API.v1.helperMethods.set('isUserFromParams', function _isUserFromParams() { 2 | const params = this.requestParams(); 3 | 4 | return (!params.userId && !params.username && !params.user) || 5 | (params.userId && this.userId === params.userId) || 6 | (params.username && this.user.username === params.username) || 7 | (params.user && this.user.username === params.user); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/rocketchat-colors/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | name: 'rocketchat:colors', 3 | version: '0.0.1', 4 | summary: 'Message pre-processor that will process colors', 5 | git: '' 6 | }); 7 | 8 | Package.onUse(function(api) { 9 | api.use('rocketchat:lib'); 10 | api.use('ecmascript'); 11 | 12 | api.addFiles('client.js', ['client']); 13 | api.addFiles('style.css', ['client']); 14 | api.addFiles('settings.js', ['server']); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/rocketchat-ui/client/views/app/home.html: -------------------------------------------------------------------------------- 1 | 2 |
{{_ "Opened_in_a_new_window"}}
9 |