第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

您如何使用 laravel slack 通知 api 在 (@) 某人處于 slack 狀態(tài)?

您如何使用 laravel slack 通知 api 在 (@) 某人處于 slack 狀態(tài)?

PHP
茅侃侃 2022-07-16 16:21:12
我有一個(gè)功能正常的通知系統(tǒng),可以發(fā)布到我們公司 Slack 的頻道。但是,遇到的一切都只是文本。linkNames假設(shè)在您的內(nèi)容中查找/鏈接用戶名。我看到它被設(shè)置為“1”,但當(dāng)它出現(xiàn)在頻道中時(shí)沒有影響。 namespace App\Notifications;use Illuminate\Bus\Queueable;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Notifications\Notification;use Illuminate\Notifications\Messages\SlackMessage;class Dd extends Notification{use Queueable;/** * Create a new notification instance. * * @return void */public function __construct(){    //}/** * Get the notification's delivery channels. * * @param  mixed  $notifiable * @return array */public function via($notifiable){    return ['slack'];}/** * Get the array representation of the notification. * * @param  mixed  $notifiable * @return array */public function toArray($notifiable){    return [        //    ];}/** * Get the Slack representation of the notification. * * @param  mixed  $notifiable * @return SlackMessage */public function toSlack($slackComment){       $slackMessage = new SlackMessage();    $slackMessage->linkNames();    $slackMessage->from('Christopher');    $slackMessage->to($slackComment->channel);    $slackMessage->content("Harded coded for example @christopher <- this doesn't get linked to the user in slack but should");     $slackMessage->info();    //dd($slackMessage); // this shows that the linkedNames attribute has been set to "1"    return $slackMessage;             }}這是一個(gè)已知問題,版本不匹配,還是我遺漏了什么?
查看完整描述

1 回答

?
料青山看我應(yīng)如是

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超8個(gè)贊

https://api.slack.com/reference/surfaces/formatting#mentioning-users

要在應(yīng)用發(fā)布的文本中提及用戶,您需要按以下語法提供他們的用戶 ID:

Hey <@U024BE7LH>, thanks for submitting your report.


查看完整回答
反對 回復(fù) 2022-07-16
  • 1 回答
  • 0 關(guān)注
  • 140 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號