Giter Site home page Giter Site logo

microsoft-teams's People

Contributors

atymic avatar cannonb4ll avatar douglasdc3 avatar freekmurze avatar jmurphy45 avatar joshualicense avatar laravel-shift avatar seb33300 avatar tob0t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

microsoft-teams's Issues

How to obtain individual user's webhook URL for config via User model DB

Hi, I've just been browsing the Microsoft Teams notification channel. In my web application, users have the option to intgrate Microsoft Teams to receive notifications, by design, each user in my system needs their own webhook URL, but the assumption of this channel is that only one Microsoft Teams account will be set up and used as the config doesn't seem to mention anything about pulling from the DB.

How can I obtain the user's webhook URL that they desire in my User model?

[Feature] Dismiss Button

is it possible to make a button disappear after clicking it?

or dismiss the whole card like polly?

Thank you

image

405 Client Error? No response body

Trying to set it up so it sends me a message when a new user is created. But I keep getting and no reason as to why. Was hoping someone else has seen this before.

Microsoft Teams responded with an error 405 - Client error: POST https://teams.microsoft.com/l/channel/19%3ab078bb283c3843ec89b3849330d32773%40thread.skype/TestChat?groupId=a0dfa142-c15d-46d0-b400-071d26173017&tenantId=df2dd858-6005-4352-b666-dd038f050723` resulted in a 405 Method Not Allowed response`

Timeout for requests

Hi,

thanks for your great package, it has worked flawlessly for 2 years in my company.

But I think it would be great to add a timeout option for requests, something in config files which would be 0 by default but can be configured for a timeout.

Context :
There were some problems with incoming teams webhooks this monday and tuesday (with absolutely no communication from microsoft about the issue by the way) which resulted in a disruption of our ticketing system (which sends notifcations to teams) at my company.

random 500 and 503 errors which we can catch and log, without any disruption of service, but the webhook would sometimes not respond at all, which resulted in a 504 error for our customers.

I had to fork the project in a private package and add this functionnality, since this was critical for us and I could'nt wait for an approval of a PR, but let me know if you're interested so I can make it a little cleaner and propose a PR.

Mentioning users in message & link with text

How do I mention users in the content/title of a message?

I tried doing:
@my Name
@my_email
@microsoft_user_id

<at>My Name</at>
<at>my_email</at>
<at>microsoft_user_id</at>
return MicrosoftTeamsMessage::create()
            ->to(config('services.microsoft_teams.webhook_url'))
            ->type($contents[1])
            ->title($contents[0])
            ->content($contents[0], [
                [
                    'entities' => [
                        [
                            'type' => 'mention',
                            'text' => '<at>' . $this->users[0]->getFullName() . '</at>',
                            'mentioned' => [
                                'id' => $this->users[0]->email,
                                'name' => $this->users[0]->getFullName()
                            ]
                        ],
                        [
                            'type' => 'mention',
                            'text' => '<at>' . $this->users[0]->email . '</at>',
                            'mentioned' => [
                                'id' => {microsoft_user_id}',
                                'name' => $this->users[0]->getFullName()
                            ]
                        ]
                    ]
                ]
            ])

But I just can't seem to get a proper mention.

Too few arguments to function ::routeNotificationFor(), 1 passed, 2 expected

On line 38 of MicrosoftTeamsChannel, you're calling

            $to = $notifiable->routeNotificationFor('microsoftTeams');

However, routeNotificationFor should have a 2nd argument which is the $notification object. This SHOULD be changed to

            $to = $notifiable->routeNotificationFor('microsoftTeams', $notification);

Channel Launch

  • Code Review
  • Add to website
  • Create packagist package
  • Github actions
  • Style CI
  • Scrutinizer
  • Add badges

images ?

I have tried all the possible options to add an image, but it never shows:


        $teams->image('https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Seattle_monorail01_2008-02-25.jpg/1024px-Seattle_monorail01_2008-02-25.jpg');
        $teams->heroImage('https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Seattle_monorail01_2008-02-25.jpg/1024px-Seattle_monorail01_2008-02-25.jpg');

        $teams->options([
            // "@type" => "application/vnd.microsoft.card.thumbnail",
            "title" => "title",
            "subtitle" => "subtitle",
            "text" => "text",
            "image" => "https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Seattle_monorail01_2008-02-25.jpg/1024px-Seattle_monorail01_2008-02-25.jpg",
            "images" => ["url" => "https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Seattle_monorail01_2008-02-25.jpg/1024px-Seattle_monorail01_2008-02-25.jpg" ]
        ]);

I tried with all @types in https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference: Thumbnail, Cards, Heros, ...

Also this is the further I get:

$teams->options([
                "sections" => [
                    [
                        "images" => [
                            [
                                "image" => $image
                            ]
                        ]
                    ]
                ]
            ]);

This generates this JSON payload (I took it exactly before it sends to Microsoft)
$response = $this->microsoftTeams->send($message->getWebhookUrl(), $message->toArray());

{
    "@type": "MessageCard",
    "@context": "https:\/\/schema.org\/extensions",
    "summary": "summary",
    "themeColor": "#1976D2",
    "text": "text",
    "title": "title",
    "sections": [
        {
            "images": [
                {
                    "image": "http://connectorsdemo.azurewebsites.net/images/WIN12_Anthony_02.jpg"
                }
            ]
        }
    ]
}

And this works PERFECTLY in https://messagecardplayground.azurewebsites.net/

But not through this module.

Any way to really add an image ?
The only thing I got is an avatar (little circle image), but it's not a big image ;-)
I've tried with gif, jpg, png, ... even the image of the Microsoft documentation (the monorail :-) )

help to sending message

Hello, I would like to send an online message after a task, is it possible? Could you give me an example?

Note: I have not been able to send without creating a Controller, that's why my query.

Thank you

Example code

    $channel = new MicrosoftTeamsChannel(config('services.microsoft_teams.DTES_url'));

    $teamsMessage= MicrosoftTeamsMessage::create()
        ->type('warning')
        ->title('Cliente No Encontrado')
        ->content('Test<br><br>');

    $response = $channel->send(null, **$teamsMessage);**

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.