MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getIntegration

Function getIntegration

packages/db/src/services/notification.service.ts:97–119  ·  view source on GitHub ↗
(integrationId: string | null)

Source from the content-addressed store, hash-verified

95);
96
97function getIntegration(integrationId: string | null) {
98 if (integrationId === APP_NOTIFICATION_INTEGRATION_ID) {
99 return {
100 integrationId: null,
101 sendToApp: true,
102 sendToEmail: false,
103 };
104 }
105
106 if (integrationId === EMAIL_NOTIFICATION_INTEGRATION_ID) {
107 return {
108 integrationId: null,
109 sendToApp: false,
110 sendToEmail: true,
111 };
112 }
113
114 return {
115 sendToApp: false,
116 sendToEmail: false,
117 integrationId,
118 };
119}
120
121function stripNullChars<T>(value: T): T {
122 if (typeof value === 'string') {

Callers 1

createNotificationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected