+ public function sendWhisper($to, $msg) {
+ $this->logger->info('sending whisper to '.$to.': '.$msg);
+ try {
+ $response = $this->token->request()->post('/whispers?from_user_id='.$this->user_id.'&to_user_id='.$to, [
+ 'message' => $msg,
+ ]);
+ if (!$response->successful()) {
+ $this->logger->error('sending whisper to '.$to.': '.$response->status());
+ }
+ } catch (\Exception $e) {
+ $this->logger->error('sending whisper to '.$to.': '.$e->getMessage());
+ }
+ }
+