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