Problem with Member_2 / Member and sendMessage method #11694

I’m having some major issues optimizing a notification bot made with Teams Toolkit.

My main problem is that:
const member = await notificationApp.notification.findMember( async (m) => m.account.email === email );
takes literally too long. with barely 50 members, it takes 1 minute to execute that, it means that to send 50 single messages it’s taking almost one hour.

So I hosted a Redis service on Azure, and I wanted to save the user inside redis, which reduce a lot the time to read the user. The problema is that I’m not able to build the Member from the info I’m saving on Redis. Considering that I can just save json on Redis, I saved what I could and I’m trying to build Member class from it’s constructor. This is more or less what I have done:

let memberFromRedis = await getMemberFromRedis(email); const account = memberFromRedis["account"] as TeamsChannelAccount; const conversationReference = memberFromRedis["parent"]["conversationReference"]; const teamsBotInstallation = await notificationApp.notification.buildTeamsBotInstallation(conversationReference); // @ts-ignore const user = new Member(teamsBotInstallation , account);

I’m using ts-ignore because I’m getting this weird type error:
enter image description here
translated it’s:
Argument type ‘TeamsBotInstallation_2’ it is not assignable to parameeter type ‘TeamsBotInstallation’.
Types of property ‘adapter’ are not compatible.
In the type ‘CloudAdapter’ are missing the following properties of the type ‘BotFrameworkAdapter’: TokenApiClientCredentialKey, credentials, credentialsProvider, settings and other 41.

but inside the types I can see:
TeamsBotInstallation_2 as TeamsBotInstallation,
so they should be the same type right?

anyway, debugging this code seems the user is the same but when I come to
await user.sendMessage(“test”);
I’m getting this error:
enter image description here

{ "code": "Internal", "message": "Error:CloudAdapterBase.continueConversationis deprecated, please useCloudAdapterBase.continueConversationAsync" } 

for some reasons, the type coming back from findMember (Member_2) it looks like slighlty different from Member class, even tho in this case as well I can see from types export Member_2 as Member, so I expect them to be exactly the same.

With some breakpoint I can notice just a small difference:
enter image description here

the functions (not just this one but sendAdaptiveCard and the others as well) seems to point to different locations, the type of the object seems different.. is this normal or is this the problem? anyway, how can I solve that?

I tried creating the Member from its constructor, parsing with json, parsing with ‘as Member’, tried literally everything, but no way to get this work.