*/
use Friendica\App;
+use Friendica\Content\OEmbed;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\GContact;
+use Friendica\Model\Group;
use Friendica\Model\Photo;
+use Friendica\Model\User;
use Friendica\Object\Image;
require_once 'include/enotify.php';
$contact_id = $r[0]['id'];
- $g = q("SELECT def_gid FROM user WHERE uid = %d LIMIT 1",
- intval($uid)
- );
-
- if ($g && intval($g[0]['def_gid'])) {
- require_once 'include/group.php';
- group_add_member($uid, '', $contact_id, $g[0]['def_gid']);
- }
+ Group::addMember(User::getDefaultGroup($uid), $contact_id);
$photos = Photo::importProfilePhoto($avatar, $uid, $contact_id, true);
function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $picture)
{
- require_once "include/oembed.php";
require_once "include/network.php";
$tags = "";
if ($url->url && $url->expanded_url && $url->display_url) {
$expanded_url = original_url($url->expanded_url);
- $oembed_data = oembed_fetch_url($expanded_url);
+ $oembed_data = OEmbed::fetchURL($expanded_url);
// Quickfix: Workaround for URL with "[" and "]" in it
if (strpos($expanded_url, "[") || strpos($expanded_url, "]")) {