* Send a user message to the remote session via HTTP POST
(
content: RemoteMessageContent,
opts?: { uuid?: string },
)
| 217 | * Send a user message to the remote session via HTTP POST |
| 218 | */ |
| 219 | async sendMessage( |
| 220 | content: RemoteMessageContent, |
| 221 | opts?: { uuid?: string }, |
| 222 | ): Promise<boolean> { |
| 223 | logForDebugging( |
| 224 | `[RemoteSessionManager] Sending message to session ${this.config.sessionId}`, |
| 225 | ) |
| 226 | |
| 227 | const success = await sendEventToRemoteSession( |
| 228 | this.config.sessionId, |
| 229 | content, |
| 230 | opts, |
| 231 | ) |
| 232 | |
| 233 | if (!success) { |
| 234 | logError( |
| 235 | new Error( |
| 236 | `[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`, |
| 237 | ), |
| 238 | ) |
| 239 | } |
| 240 | |
| 241 | return success |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Respond to a permission request from CCR |
no test coverage detected