-
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 'feat/federation-feat-2' of github.com:RocketChat/Rocket…
….Chat into matrixSearch * 'feat/federation-feat-2' of github.com:RocketChat/Rocket.Chat: (31 commits) fix: removing file wrongly merged on update merge [NEW] Federation search public rooms in the Matrix network (#27434) Chore: Refactor other kinds of message - Phase 2 (#27927) Chore: improve some e2e selectors (#27936) [NEW] Warning Popup reinforcing Zapier deprecation on Integrations Admin settings (#27744) Chore: Notify Marketplace on App Install (#27925) i18n: Language update from LingoHub 🤖 on 2023-01-23Z (#27814) [FIX][ENTERPRISE] DDP streamer sending data to destroyed streams (#27929) Chore: Migrate cached collections to TypeScript (#27909) i18n: Language update from LingoHub 🤖 on 2023-01-09Z (#27705) [FIX] Reduce re-subscription on `notify-room/user-activity` stream event (#27911) [FIX] Unread Message count not displayed for new messages in Omni-Rooms (#27539) Chore: Improve service's licence check (#27872) [IMPROVE] Livechat Persian translation (#27825) Chore(deps): Bump thehanimo/pr-title-checker from 1.3.4 to 1.3.6 (#27884) Chore: use useQuery in place of deprecated useEndpointData (#27673) Chore: Update Some Composer Icons (#27862) Regression: Undefined default message context (#27870) Chore: Remove OS version for device management (#27786) [BREAK] Remove less theming (#27647) ...
- Loading branch information
Showing
448 changed files
with
6,930 additions
and
6,422 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"Storybook stories module for React component": { | ||
"scope": "typescriptreact", | ||
"prefix": "sbmodule", | ||
"body": [ | ||
"import type { ComponentMeta, ComponentStory } from '@storybook/react';", | ||
"import React from 'react';", | ||
"", | ||
"import $1 from './$1';", | ||
"", | ||
"export default {", | ||
"\ttitle: '$2',", | ||
"\tcomponent: $1,", | ||
"} as ComponentMeta<typeof $1>;", | ||
"", | ||
"export const Example: ComponentStory<typeof $1> = (args) => <$1 {...args} />;", | ||
] | ||
}, | ||
"Storybook meta": { | ||
"scope": "typescriptreact", | ||
"prefix": "sbmeta", | ||
"body": [ | ||
"export default {", | ||
"\ttitle: '$1',", | ||
"\tcomponent: $2,", | ||
"} as ComponentMeta<typeof $2>;" | ||
] | ||
}, | ||
"Storybook story": { | ||
"scope": "typescriptreact", | ||
"prefix": "sbstory", | ||
"body": [ | ||
"export const $1: ComponentStory<typeof $2> = (args) => <$2 {...args} />;" | ||
] | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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
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 {} | ||
} |
Oops, something went wrong.