-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/CS-19-connectivity-services' into CS-313-use-works…
…pace-token-instead-of-user-token-for-modals
- Loading branch information
Showing
179 changed files
with
2,851 additions
and
1,551 deletions.
There are no files selected for viewing
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,46 @@ | ||
import type { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata'; | ||
|
||
import { getWorkspaceAccessToken } from '../../../cloud/server'; | ||
import { settings } from '../../../settings/server'; | ||
import { Info } from '../../../utils/server'; | ||
|
||
export type installAction = 'install' | 'update' | 'uninstall'; | ||
|
||
export async function notifyAppInstall(marketplaceBaseUrl: string, action: installAction, appInfo: IAppInfo): Promise<void> { | ||
const headers: { Authorization?: string } = {}; | ||
|
||
try { | ||
const token = await getWorkspaceAccessToken(); | ||
headers.Authorization = `Bearer ${token}`; | ||
|
||
// eslint-disable-next-line no-empty | ||
} catch {} | ||
|
||
let siteUrl = ''; | ||
try { | ||
siteUrl = settings.get<string>('Site_Url'); | ||
|
||
// eslint-disable-next-line no-empty | ||
} catch {} | ||
|
||
const data = { | ||
action, | ||
appName: appInfo.name, | ||
appSlug: appInfo.nameSlug, | ||
appVersion: appInfo.version, | ||
rocketChatVersion: Info.version, | ||
engineVersion: Info.marketplaceApiVersion, | ||
siteUrl, | ||
}; | ||
|
||
const pendingSentUrl = `${marketplaceBaseUrl}/v1/apps/${appInfo.id}/install`; | ||
|
||
try { | ||
HTTP.post(pendingSentUrl, { | ||
headers, | ||
data, | ||
}); | ||
|
||
// eslint-disable-next-line no-empty | ||
} catch {} | ||
} |
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
6 changes: 4 additions & 2 deletions
6
apps/meteor/app/authorization/lib/index.js → apps/meteor/app/authorization/lib/index.ts
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,10 +1,12 @@ | ||
export const getSettingPermissionId = function (settingId) { | ||
import type { ISetting } from '@rocket.chat/core-typings'; | ||
|
||
export const getSettingPermissionId = function (settingId: ISetting['_id']) { | ||
// setting-based permissions | ||
return `change-setting-${settingId}`; | ||
}; | ||
|
||
export const CONSTANTS = { | ||
SETTINGS_LEVEL: 'settings', | ||
}; | ||
} as const; | ||
|
||
export { AuthorizationUtils } from './AuthorizationUtils'; |
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
apps/meteor/app/custom-sounds/client/notifications/deleteCustomSound.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
2 changes: 1 addition & 1 deletion
2
apps/meteor/app/custom-sounds/client/notifications/updateCustomSound.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 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
2 changes: 1 addition & 1 deletion
2
...eteor/app/models/client/models/Avatars.js → ...eteor/app/models/client/models/Avatars.ts
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.