use Friendica\Model\Contact;
use Friendica\Model\Conversation;
use Friendica\Model\FContact;
+use Friendica\Model\GServer;
use Friendica\Model\Item;
use Friendica\Model\ItemURI;
use Friendica\Model\Mail;
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
$message_id = self::messageExists($importer["uid"], $guid);
if ($message_id) {
return true;
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
$conversation = DBA::selectFirst('conv', [], ['uid' => $importer["uid"], 'guid' => $guid]);
if (!DBA::isResult($conversation)) {
$r = q(
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
$message_id = self::messageExists($importer["uid"], $guid);
if ($message_id) {
return true;
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
$conversation = null;
$condition = ['uid' => $importer["uid"], 'guid' => $conversation_guid];
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
if (self::messageExists($importer["uid"], $guid)) {
return true;
}
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
$message_id = self::messageExists($importer["uid"], $guid);
if ($message_id) {
return true;
return false;
}
+ if (!empty($contact['gsid'])) {
+ GServer::setProtocol($contact['gsid'], Post\DeliveryData::DIASPORA);
+ }
+
$message_id = self::messageExists($importer["uid"], $guid);
if ($message_id) {
return true;
return;
}
- // Fetch some user id to have a valid handle to transmit the participation.
- // In fact it doesn't matter which user sends this - but it is needed by the protocol.
- // If the item belongs to a user, we take this user id.
- if ($item['uid'] == 0) {
- $condition = ['verified' => true, 'blocked' => false,
- 'account_removed' => false, 'account_expired' => false, 'account-type' => User::ACCOUNT_TYPE_PERSON];
- $first_user = DBA::selectFirst('user', ['uid'], $condition, ['order' => ['uid']]);
- $owner = User::getOwnerDataById($first_user['uid']);
- } else {
- $owner = User::getOwnerDataById($item['uid']);
- }
-
+ $owner = User::getOwnerDataById($item['uid']);
$author = self::myHandle($owner);
$message = ["author" => $author,