We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46929e0 commit 8de13b9Copy full SHA for 8de13b9
pkg/gps/GpsProducer.php
@@ -37,10 +37,14 @@ public function send(Destination $destination, Message $message): void
37
38
/** @var Topic $topic */
39
$topic = $this->context->getClient()->topic($destination->getTopicName());
40
- $topic->publish([
41
- 'data' => json_encode($message),
42
- 'attributes' => $message->getAttributes(),
43
- ]);
+
+ $params = ['data' => json_encode($message)];
+ if (count($message->getAttributes()) > 0) {
44
+ $params['attributes'] = $message->getAttributes();
45
+ }
46
47
+ $topic->publish($params);
48
}
49
50
public function setDeliveryDelay(?int $deliveryDelay = null): Producer
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments