mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
New reg system for intercom
This commit is contained in:
parent
47727f1321
commit
57f4401d0b
1 changed files with 6 additions and 2 deletions
|
|
@ -29,10 +29,14 @@ struct MainApp: App {
|
|||
WindowGroup {
|
||||
RootView(
|
||||
intercomProvider: AppKeys.sharedInstance?.intercom != nil ? IntercomProvider(
|
||||
registerIntercomUser: { Intercom.registerUser(withUserId: $0) },
|
||||
registerIntercomUser: { userId in
|
||||
let userAttributes = ICMUserAttributes()
|
||||
userAttributes.userId = userId
|
||||
Intercom.loginUser(with: userAttributes)
|
||||
},
|
||||
setIntercomUserHash: { Intercom.setUserHash($0) },
|
||||
unregisterIntercomUser: Intercom.logout,
|
||||
showIntercomMessenger: Intercom.presentMessenger
|
||||
showIntercomMessenger: Intercom.present
|
||||
) : nil
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue