$sender = DI::twitterUser()->createFromUserId($uid, true)->toArray();
- $cid = BaseApi::getContactIDForSearchterm($_REQUEST['screen_name'] ?? '', $_REQUEST['profileurl'] ?? '', $_REQUEST['user_id'] ?? 0, $uid);
+ $cid = BaseApi::getContactIDForSearchterm($_REQUEST['screen_name'] ?? '', $_REQUEST['profileurl'] ?? '', $_REQUEST['user_id'] ?? 0, 0);
if (empty($cid)) {
throw new NotFoundException('Recipient not found');
}
*/
public function testApiDirectMessagesNewWithUserId()
{
- $_POST['text'] = 'message_text';
- $_POST['user_id'] = $this->otherUser['id'];
+ $_POST['text'] = 'message_text';
+ $_REQUEST['user_id'] = $this->otherUser['id'];
$result = api_direct_messages_new('json');
self::assertEquals(['direct_message' => ['error' => -1]], $result);
}