PubsubChannel returns the chat-scoped pubsub channel for debug events. Nil chat IDs use the shared broadcast channel so publishers and subscribers can coordinate through one discoverable helper.
(chatID uuid.UUID)
| 162 | // Nil chat IDs use the shared broadcast channel so publishers and subscribers |
| 163 | // can coordinate through one discoverable helper. |
| 164 | func PubsubChannel(chatID uuid.UUID) string { |
| 165 | if chatID == uuid.Nil { |
| 166 | return BroadcastPubsubChannel |
| 167 | } |
| 168 | return "chat_debug:" + chatID.String() |
| 169 | } |