Skip to content

Commit

Permalink
chore(core/react): remove not useful Providers
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbasten17 committed May 2, 2024
1 parent 368830d commit 7ca58d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
18 changes: 0 additions & 18 deletions packages/botonic-core/src/models/legacy-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,24 +273,6 @@ export interface Params {
[key: string]: any
}

export const Providers = Object.freeze({
Messaging: {
APPLE: 'apple',
FACEBOOK: 'facebook',
GENERIC: 'generic',
IMBEE: 'imbee',
INSTAGRAM: 'instagram',
INTERCOM: 'intercom',
SMOOCH_WEB: 'smooch_web',
SMOOCH: 'smooch',
TELEGRAM: 'telegram',
TWITTER: 'twitter',
WEBCHAT: 'webchat',
WECHAT: 'wechat',
WHATSAPP: 'whatsapp',
},
})

export type Nullable<T> = T | null

export type Action = Nullable<() => any>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Providers } from '@botonic/core'
import { PROVIDER } from '@botonic/core'

/**
*
Expand Down Expand Up @@ -75,11 +75,7 @@ export function getMultichannelReplies(node) {
}

export const isWhatsapp = context =>
context.session &&
context.session.user &&
context.session.user.provider == Providers.Messaging.WHATSAPP
context.session?.user?.provider === PROVIDER.WHATSAPP

export const isFacebook = context =>
context.session &&
context.session.user &&
context.session.user.provider == Providers.Messaging.FACEBOOK
context.session?.user?.provider === PROVIDER.FACEBOOK

0 comments on commit 7ca58d5

Please sign in to comment.