MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
288 stars 511 forks source link

Emoji no longer work in Webhook or Graph API #10832

Open GitWatin opened 6 months ago

GitWatin commented 6 months ago

Steps to reproduce

Hello,

I'm using Powershell to update my teams status message via Microsoft Graph and command Set-MgUserPresenceStatusMessage

I would like to send emoji in my message and I noticed that emoji character with unicode after 1FXX doesn't work

For exemple with code ▶ it's work

image

And with code 🏠 (reffering to the house) it doesn't work

image

Anyone have the same issue ?


$Test = "🏠"

Function CreateTeamsObject {
    Param (
        [string]$message
    )
    $DayDate=Get-Date -Format "yyyy-MM-dd" | Out-String
    $EndDay="T23:59:00"
    $EndOfDay=$DayDate+$EndDay
    $params = @{
        statusMessage = @{
            message        = @{
                content     = $message
                contentType = "text"
            }
            expiryDateTime = @{
                dateTime = $EndOfDay
                timeZone = "Europe/Paris"
            }
        }
    }
    Set-MgUserPresenceStatusMessage -UserId $userId -BodyParameter $params

CreateTeamsObject -message "I am currently at Home $test  <pinnednote></pinnednote>"

Expected behavior

Image displayed as pictures, not code

Actual behavior

Emoji are displayed as number, not picture

Error details

No response

ChetanSharma-msft commented 6 months ago

Hello @GitWatin - Thanks for raising your query. Could you please conform if it was working previously because it may not be supported?

It is also working with other codes?

GitWatin commented 6 months ago

Hello @ChetanSharma-msft

Yes it work in the past. I found some topics on StackOverFlow regarding this issues. Seems to be since 2 or 3 Teams release version.

I don't try with other code.

Regarding the emoji, I use this list : https://www.unicode.org/emoji/charts/full-emoji-list.html

Prasad-MSFT commented 6 months ago

Hi @GitWatin - We tried to repro this issue by sending message having unicode emoji and observed that, emoji character with unicode after 1FXX doesn't work.

For example, emoji with unicode U+2764 works.

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "contentUrl": null,
      "content": {
        "type": "AdaptiveCard",
        "$schema": "[http://adaptivecards.io/schemas/adaptive-card.json"](http://adaptivecards.io/schemas/adaptive-card.json%22),
        "version": "1.4",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "Emoji tester: &#x2764;"
          }
        ]
      }
    }
  ]
}

image

However, emoji with unicode U+1F3E0 doesn't work.

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "contentUrl": null,
      "content": {
        "type": "AdaptiveCard",
        "$schema": "[http://adaptivecards.io/schemas/adaptive-card.json"](http://adaptivecards.io/schemas/adaptive-card.json%22),
        "version": "1.4",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "Emoji tester: &#x1F3E0;"
          }
        ]
      }
    }
  ]
}

image

Checked with Microsoft Teams version 24116.2502.2841.3203. The client version is 49/24050218100.

In Mobile devices (Android): image

GitWatin commented 6 months ago

Hey @Prasad-MSFT

It's exactly the issues I encounter, not via webhook but microsoft graph but I assume it's the same "bug"

Thanks a lot for your help

There is my Teams version : image

Prasad-MSFT commented 6 months ago

@GitWatin - We have raised a bug for the same and assigned to engineering team We will inform you once we get any further update from engineering team.

Thanks!

JBodkin-Amphora commented 1 week ago

I'm seeing the same issue when using a Incoming Webhook in Microsoft Teams

Prasad-MSFT commented 1 week ago

Thank you for your inquiry regarding the status of the bug. We are currently checking in with the engineering team for any updates.

We appreciate your patience and will inform you as soon as we have more information. Thank you!