MsTeams pop out image is working in msteams web version but not working in mobile version - microsoft-teams

I've created a hero card that users get at the time of installing our app. In that I'm trying to put a popout image for a button. I've tried with this code.
CardFactory.heroCard(
'Welcome to PeopleCues!',
await this.getMessage(),
[logo_url],
[
{
type: ActionTypes.OpenUrl,
title: 'connect',
value: url,
image: "https://okr-app-store.s3.ap-south-1.amazonaws.com/icons8-open-in-popup-32.png"
},
{
type: ActionTypes.PostBack,
title: 'Install app for all Org users',
text: 'Install app for all Org users'
},
{
type: ActionTypes.PostBack,
title: 'help',
text: 'help'
}
]
);
It shows pop out icon on the button beside the text in web version, but the same is not happening in msteams mobile app. This is a mandatory fix to pass the validation by MicrosoftAppSubmissionTeam, what can I do to reflect the same image in mobileapp as well
?
above card in msteams mobile app.
above card in msteams web app.

Related

How to Make FireFox recieve background push notification without loading page?

I am using FCM for web push notifications.
All worked fine until suddenly Firefox stopped delivering push notifications except the page is open in the browser.
If the page is loaded and not in focus, notifications come in. I console.log()'d the onBackgroundMessage payload and I can confirm that the service worker receives it. But if I close that tab and send a push notification, it does not receive it.
The same setup works on Chrome, Opera, and Edge just fine no errors. Is there something with firefox?
Firefox version: 88.0.1 (64-bit)
in my Service Worker I have:
messaging.onBackgroundMessage(function (payload) {
// Customize notification here
var action_label;
if('action_label' in payload.data){
action_label = payload.data.action_label;
} else{
action_label = "Details";
}
const notificationTitle = payload.data.title;
const notificationOptions = {
body: payload.data.body,
icon: payload.data.icon,
requireInteraction: true,
data: {
click_action: payload.data.click_action,
url:payload.data.click_action
},
actions: [
{
action: "open_url", title: action_label
}
]
};
self.registration.showNotification(notificationTitle, notificationOptions);
});
This had to do with Firefox quitting instead closing, obtainable in MacBooks.
Not a real technical issue.

BotFramework - chatTitle option for V4

Migrating from BotFramework V3 to V4, not able to set the chatTitle of chat window.
This is my old code
BotChat.App({
user: { id: userID, name: 'test' },
botConnection: botConnection,
locale: 'fr-fr',
showUploadButton: false,
chatTitle: 'Assistant virtuel',
resize: 'detect'
})
Now with new version, 'chatTitle' is no longer working.
window.WebChat.renderWebChat(
{
directLine: webChatConnection,
userID: userID,
username: 'test',
locale: 'fr-fr',
chatTitle: 'Assistant virtuel',
},
document.getElementById('botDiv')
);
According to this issue Here
We omitted the chat title in Web Chat v4 (compare to v3) because:
It is one of the most popular customization
It can be easily done in HTML by appending HTML code just before Web Chat DOM element
It is more intuitive to do it in plain HTML than "customizing" in Web Chat, feel over-engineered if we do it that way
In this way, the user can customize the title as much as they want, for example, adding buttons to the chat title easily.
Check this Answer here if it has what you need using Javascript

Choice prompt does not render buttons in MS Bot framework

I'm using Nodejs SDK and sending a choice promot to the user like this :
builder.Prompts.choice(
session,
bot_response,
"Yes|No",
{
maxRetries: 3,
retryPrompt: 'Sorry, that is not a valid input'
},
{
listStyle: builder.ListStyle.button
}
);
This is how it is rendered:
How do I make it render it in button style?

How to use Azure Speech Service in Bot Framework Web Chat

I am using Bot Framework Web Chat and I correctly setup a front-end for the user to chat with my bot. I am trying to enable speech for it, I try following the tutorial here: https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-webchat-speech?view=azure-bot-service-3.0
The problem I have is I try to use Azure Speech Service, I setup my service correctly, and I set the key. But I am not sure where to get the CognitiveServices? The tutorial doesn't specify where to get it.
Here is my code:
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
const speechOptionsRemote = {
speechRecognizer: new CognitiveServices.SpeechRecognizer({ subscriptionKey: '...' }),
speechSynthesizer: new CognitiveServices.SpeechSynthesizer({
gender: CognitiveServices.SynthesisGender.Female,
subscriptionKey: '...',
voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
})
};
BotChat.App({
directLine: { secret: '...' },
user: { id: 'WebChat' },
bot: { id: '...' },
resize: 'detect',
speechOptions: speechOptionsRemote,
showUploadButton: false
}, document.getElementById("bot"));
var header = document.getElementsByClassName("wc-header");
header[0].innerHTML = "<span ><p align='center' >My Bot</p></span>"
</script>
It complain that CogntiveService is not found when I navigate to the page. Where do I get it?
Your code sample is using v3 of Webchat, which is now deprecated, see here. There is a v4 of BotFramework-WebChat on the GitHub repository, the update has been a few days ago.
So when in your code your are downloading cdn.botframework.com/botframework-webchat/latest/botchat.js, it is the v4: that explains why it can't found CognitiveServices: it has been refactored.
For using Cognitive Services Speech in the v4, have a look to the dedicated sample: https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples/speech-cognitive-services-bing-speech

RocketChat PostMessage using attachments fields

i'm trying to send a custom message using attachments fields
{
title: 'Markdown Test',
value: '`hi`',
short: false
},
{
title: 'Markdown Test',
value: '```hi```',
short: false
}
But when I recieve this message at the brower the markdown is not rendered.
I noticed the inline_code and the multi line code markdown is not been rendered.
What i'm doing wrong?
Best regards, Amandio Magalhaes

Resources