-
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.
[NEW] Omnichannel source identification fields (#23090)
* Add new fields to IOmnichannelRoom and adapt livechat bridge to them * Add source information to places that create livechat rooms * Add deprecation warning to unused livechat methods and remove source from native facebook integration * Remove unnecesary alias for widget * Update app/lib/server/lib/deprecationWarningLogger.ts * Update Apps-Engine version * frontend part * Change way of identifying when a chat is coming through widget * Update deprecationlogger to new logger interface * Fix usage of source.type as key * sms icon * [NEW] Add Channel Source details to room info panel (#23224) * Add Source icon/text to room info * Fix TS error and styling * Change order * Typing and style fix * Use source.id instead of email object * useEndpoint * Revert "Merge branch 'develop' into new/omnichannel-source-fields" This reverts commit 7fea2ad, reversing changes made to dbbcaf4. * Removing unnecesary changes from branch * why github, why? * Bump icons & fuselage to latest versions Co-authored-by: Kevin Aleman <kevin.aleman@rocket.chat> Co-authored-by: Tiago Evangelista Pinto <tiago.evangelista@rocket.chat> Co-authored-by: Martin Schoeler <martin.schoeler@rocket.chat>
- Loading branch information
1 parent
c2ab5e1
commit 0f36b36
Showing
29 changed files
with
4,974 additions
and
4,686 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { API } from '../api'; | ||
import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; | ||
|
||
(API as any).helperMethods.set('deprecationWarning', function _deprecationWarning({ endpoint, versionWillBeRemoved, response }: { endpoint: string; versionWillBeRemoved: string; response: any }) { | ||
const warningMessage = `The endpoint "${ endpoint }" is deprecated and will be removed after version ${ versionWillBeRemoved }`; | ||
apiDeprecationLogger.warn(warningMessage); | ||
if (process.env.NODE_ENV === 'development') { | ||
return { | ||
warning: warningMessage, | ||
...response, | ||
}; | ||
} | ||
|
||
return response; | ||
}); |
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,13 @@ | ||
import { parse } from 'cookie'; | ||
|
||
import { API } from '../api'; | ||
|
||
(API as any).helperMethods.set('isWidget', function _isWidget() { | ||
// @ts-expect-error | ||
const { headers } = this.request; | ||
|
||
const { rc_room_type: roomType, rc_is_widget: isWidget } = parse(headers.cookie); | ||
|
||
const isLivechatRoom = roomType && roomType === 'l'; | ||
return !!(isLivechatRoom && isWidget === 't'); | ||
}); |
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,7 @@ | ||
import { Logger } from '../../../logger/server'; | ||
|
||
const deprecationLogger = new Logger('DeprecationWarning'); | ||
|
||
export const apiDeprecationLogger = deprecationLogger.section('API'); | ||
export const methodDeprecationLogger = deprecationLogger.section('METHOD'); | ||
export const functionDeprecationLogger = deprecationLogger.section('FUNCTION'); |
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
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
Oops, something went wrong.