fix (core.gbapp): Download folder on server azure.
This commit is contained in:
		
							parent
							
								
									52d766667a
								
							
						
					
					
						commit
						b76c5ae227
					
				
					 5 changed files with 24 additions and 28 deletions
				
			
		| 
						 | 
				
			
			@ -500,6 +500,9 @@ export class GBDeployer implements IGBDeployer {
 | 
			
		|||
        fs.mkdir(pathBase);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      let packagePath = GBUtil.getGBAIPath(min.botId);
 | 
			
		||||
      packagePath = urlJoin(packagePath, remotePath);
 | 
			
		||||
 | 
			
		||||
      await CollectionUtil.asyncForEach(parts, async item => {
 | 
			
		||||
        pathBase = packagePath.join(pathBase, item);
 | 
			
		||||
        if (!(await GBUtil.exists(pathBase))) {
 | 
			
		||||
| 
						 | 
				
			
			@ -509,8 +512,6 @@ export class GBDeployer implements IGBDeployer {
 | 
			
		|||
 | 
			
		||||
      // Retrieves all files in remote folder.
 | 
			
		||||
      
 | 
			
		||||
      let packagePath = GBUtil.getGBAIPath(min.botId);
 | 
			
		||||
      packagePath = urlJoin(packagePath, remotePath);
 | 
			
		||||
      let url = `${baseUrl}/drive/root:/${packagePath}:/children`;
 | 
			
		||||
 | 
			
		||||
      GBLogEx.info(min, `Downloading: ${url}`);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1015,8 +1015,8 @@ export class GBMinService {
 | 
			
		|||
 | 
			
		||||
    // Unifies channel detection.  Unmarshalls group information.
 | 
			
		||||
 | 
			
		||||
    req.body.channelId = req.body.from.channelIdEx === 'whatsapp' ? 'omnichannel' : req.body.channelId;
 | 
			
		||||
    req.body.group = req.body.from.group;
 | 
			
		||||
    req.body.channelId = req.body?.from.channelIdEx === 'whatsapp' ? 'omnichannel' : req.body.channelId;
 | 
			
		||||
    req.body.group = req.body?.from.group;
 | 
			
		||||
 | 
			
		||||
    // Default activity processing and handler.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,8 +48,7 @@ export const getRouter = (
 | 
			
		|||
    console.log('Created conversation with conversationId: ' + conversationId);
 | 
			
		||||
 | 
			
		||||
    const activity = createConversationUpdateActivity
 | 
			
		||||
      (serviceUrl, conversationId, req.query?.userSystemId,
 | 
			
		||||
        req.query?.userName, req.query.pid
 | 
			
		||||
      (serviceUrl, conversationId
 | 
			
		||||
      );
 | 
			
		||||
    fetch(botUrl, {
 | 
			
		||||
      method: 'POST',
 | 
			
		||||
| 
						 | 
				
			
			@ -334,7 +333,7 @@ const createMessageActivity = (
 | 
			
		|||
  return obj;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const createConversationUpdateActivity = (serviceUrl: string, conversationId: string, userSystemId, userName, pid): IConversationUpdateActivity => {
 | 
			
		||||
const createConversationUpdateActivity = (serviceUrl: string, conversationId: string): IConversationUpdateActivity => {
 | 
			
		||||
  const activity: IConversationUpdateActivity = {
 | 
			
		||||
    type: 'conversationUpdate',
 | 
			
		||||
    channelId: 'api',
 | 
			
		||||
| 
						 | 
				
			
			@ -343,9 +342,9 @@ const createConversationUpdateActivity = (serviceUrl: string, conversationId: st
 | 
			
		|||
    id: uuidv4.v4(),
 | 
			
		||||
    membersAdded: [],
 | 
			
		||||
    membersRemoved: [],
 | 
			
		||||
    from: { id: userSystemId, name: userName }
 | 
			
		||||
    from: {id: "bot", name: "bot"}
 | 
			
		||||
  };
 | 
			
		||||
  activity['pid']  = pid;
 | 
			
		||||
  
 | 
			
		||||
  return activity;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -168,18 +168,17 @@ class GBUIApp extends React.Component {
 | 
			
		|||
    let _this_ = this;
 | 
			
		||||
    window['botchatDebug'] = true;
 | 
			
		||||
 | 
			
		||||
    const line = instanceClient.webchatToken ?
 | 
			
		||||
    new DirectLine({
 | 
			
		||||
    const line = instanceClient.webchatToken
 | 
			
		||||
      ? new DirectLine({
 | 
			
		||||
          token: instanceClient.webchatToken
 | 
			
		||||
    }):
 | 
			
		||||
    new DirectLine({
 | 
			
		||||
        })
 | 
			
		||||
      : new DirectLine({
 | 
			
		||||
          domain: instanceClient.domain,
 | 
			
		||||
          secret: null,
 | 
			
		||||
          token: null,
 | 
			
		||||
          webSocket: false // defaults to true
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    ;
 | 
			
		||||
    _this_.setState({ line: line });
 | 
			
		||||
 | 
			
		||||
    line.connectionStatus$.subscribe(connectionStatus => {
 | 
			
		||||
| 
						 | 
				
			
			@ -350,12 +349,10 @@ class GBUIApp extends React.Component {
 | 
			
		|||
            <SidebarMenu chat={this.chat} instance={this.state.instanceClient} />
 | 
			
		||||
          </div>
 | 
			
		||||
        );
 | 
			
		||||
    
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    return (
 | 
			
		||||
      <StaticContent>
 | 
			
		||||
 | 
			
		||||
        {seo}
 | 
			
		||||
        <div>
 | 
			
		||||
          {gbCss}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,6 @@ class ChatPane extends React.Component {
 | 
			
		|||
  render() {
 | 
			
		||||
    return (
 | 
			
		||||
      <Chat        
 | 
			
		||||
        
 | 
			
		||||
        ref={(chat) => { this.chat = chat; }}
 | 
			
		||||
        botConnection={this.props.botConnection}
 | 
			
		||||
        user={{ id: "webUser@gb", name: "You" }}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue