botframework
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -21,8 +21,4 @@ import { IBotController, IBotSettings, IBotReply, IBotReplyListItem } from '../interfaces'; | ||
private dispatchAttachmentMessage(messaging, user); | ||
/** | ||
* add passed email in authentication callback | ||
*/ | ||
private getNewUserFromMessage(messaging); | ||
private getUserProfile(userId); | ||
private getUserFromMessage(messaging); | ||
} |
@@ -71,3 +71,3 @@ "use strict"; | ||
if (messaging.optin) { | ||
return this.getNewUserFromMessage(messaging) | ||
return this.getUserFromMessage(messaging) | ||
.then(function (user) { | ||
@@ -124,12 +124,2 @@ return _this.botController.newUser({ user: user, ref: messaging.optin.ref }, reply); | ||
}; | ||
/** | ||
* add passed email in authentication callback | ||
*/ | ||
FacebookBot.prototype.getNewUserFromMessage = function (messaging) { | ||
return this.getUserFromMessage(messaging) | ||
.then(function (profile) { | ||
profile.email = messaging.optin.ref; | ||
return profile; | ||
}); | ||
}; | ||
FacebookBot.prototype.getUserProfile = function (userId) { | ||
@@ -136,0 +126,0 @@ var _this = this; |
{ | ||
"name": "botframework", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Framework for messaging bots", | ||
@@ -43,2 +43,2 @@ "main": "./dist/es5/src/bot.js", | ||
} | ||
} | ||
} |
@@ -64,3 +64,3 @@ import {IBotController, IBotSettings, IBotUser, ITextMessage, IBotReply, IBotReplyListItem} from '../interfaces' | ||
if (messaging.optin) { | ||
return this.getNewUserFromMessage(messaging) | ||
return this.getUserFromMessage(messaging) | ||
.then( (user: IBotUser) => { | ||
@@ -119,13 +119,2 @@ return this.botController.newUser({user, ref: messaging.optin.ref}, reply); | ||
/** | ||
* add passed email in authentication callback | ||
*/ | ||
private getNewUserFromMessage(messaging: IFbMessaging): Promise<IBotUser> { | ||
return this.getUserFromMessage(messaging) | ||
.then( (profile: IBotUser) => { | ||
profile.email = messaging.optin.ref; | ||
return profile; | ||
}); | ||
} | ||
@@ -132,0 +121,0 @@ private getUserProfile(userId: number): Promise<IFacebookProfile> { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
766843
55
15393