-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into new/…
…apps_rewrite * 'develop' of github.com:RocketChat/Rocket.Chat: (30 commits) Regression: Fix Unread bar design (#17750) Regression: Adjusting spaces between OAuth login buttons (#17745) Improved thread margins for clarity Regression: Scroll on admin user info (#17711) Regression: Removed status border on mentions list (#17741) Regression: Force unread-rooms bar to appears over the room list (#17728) [NEW][APPS-ENGINE] Essentials mechanism (#17656) Regression: Fix error preventing creation of group DMs (#17726) [FIX] SAML IDP initiated logout error (#17482) Regression: Threads list was fetching all threads (#17716) Regression: Add missing return to afterSaveMessage callbacks (#17715) [FIX] Missing dropdown to select custom status color on user's profile (#16537) [FIX] Password reset/change accepting current password as new password (#16331) [NEW][ENTERPRISE] Support Omnichannel conversations auditing (#17692) Upgrade Livechat Widget version to 1.5.0 (#17710) [FIX] Can't click on room's actions menu of sidebar list when in search mode (#16548) [NEW][ENTERPRISE] Support for custom Livechat registration form fields (#17581) Update Fuselage version (#17708) [NEW][ENTERPRISE] Omnichannel Last-Chatted Agent Preferred option (#17666) Regression: Status presence color (#17707) ...
- Loading branch information
Showing
180 changed files
with
1,354 additions
and
698 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,58 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
import { handleError } from '../../../utils'; | ||
import { actionLinks } from '../../both/lib/actionLinks'; | ||
// Action Links Handler. This method will be called off the client. | ||
import { handleError } from '../../../utils/client'; | ||
import { Messages, Subscriptions } from '../../../models/client'; | ||
|
||
actionLinks.run = (name, messageId, instance) => { | ||
const message = actionLinks.getMessage(name, messageId); | ||
// Action Links namespace creation. | ||
export const actionLinks = { | ||
actions: {}, | ||
register(name, funct) { | ||
actionLinks.actions[name] = funct; | ||
}, | ||
getMessage(name, messageId) { | ||
const userId = Meteor.userId(); | ||
if (!userId) { | ||
throw new Meteor.Error('error-invalid-user', 'Invalid user', { function: 'actionLinks.getMessage' }); | ||
} | ||
|
||
const message = Messages.findOne({ _id: messageId }); | ||
if (!message) { | ||
throw new Meteor.Error('error-invalid-message', 'Invalid message', { function: 'actionLinks.getMessage' }); | ||
} | ||
|
||
const subscription = Subscriptions.findOne({ | ||
rid: message.rid, | ||
'u._id': userId, | ||
}); | ||
if (!subscription) { | ||
throw new Meteor.Error('error-not-allowed', 'Not allowed', { function: 'actionLinks.getMessage' }); | ||
} | ||
|
||
if (!message.actionLinks || !message.actionLinks[name]) { | ||
throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { function: 'actionLinks.getMessage' }); | ||
} | ||
|
||
const actionLink = message.actionLinks[name]; | ||
return message; | ||
}, | ||
run(name, messageId, instance) { | ||
const message = actionLinks.getMessage(name, messageId); | ||
|
||
let ranClient = false; | ||
const actionLink = message.actionLinks[name]; | ||
|
||
if (actionLinks && actionLinks.actions && actionLinks.actions[actionLink.method_id]) { | ||
// run just on client side | ||
actionLinks.actions[actionLink.method_id](message, actionLink.params, instance); | ||
let ranClient = false; | ||
|
||
ranClient = true; | ||
} | ||
if (actionLinks && actionLinks.actions && actionLinks.actions[actionLink.method_id]) { | ||
// run just on client side | ||
actionLinks.actions[actionLink.method_id](message, actionLink.params, instance); | ||
|
||
// and run on server side | ||
Meteor.call('actionLinkHandler', name, messageId, (err) => { | ||
if (err && !ranClient) { | ||
handleError(err); | ||
ranClient = true; | ||
} | ||
}); | ||
|
||
// and run on server side | ||
Meteor.call('actionLinkHandler', name, messageId, (err) => { | ||
if (err && !ranClient) { | ||
handleError(err); | ||
} | ||
}); | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/action-links/both/lib/actionLinks.js → app/action-links/server/lib/actionLinks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './bigbluebutton-api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { actionLinks } from '../../../action-links/client'; | ||
|
||
actionLinks.register('createLivechatCall', function(message, params, instance) { | ||
instance.tabBar.open('video'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.