Mark if post was received via relay
This commit is contained in:
parent
2987070d93
commit
6401bd7503
|
@ -36,8 +36,6 @@ use Friendica\Util\Network;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
function dfrn_notify_post(App $a) {
|
function dfrn_notify_post(App $a) {
|
||||||
Logger::log(__function__, Logger::TRACE);
|
|
||||||
|
|
||||||
$postdata = Network::postdata();
|
$postdata = Network::postdata();
|
||||||
|
|
||||||
if (empty($_POST) || !empty($postdata)) {
|
if (empty($_POST) || !empty($postdata)) {
|
||||||
|
@ -225,7 +223,7 @@ function dfrn_dispatch_public($postdata)
|
||||||
Logger::log('Importing post from ' . $msg['author'] . ' with the public envelope.', Logger::DEBUG);
|
Logger::log('Importing post from ' . $msg['author'] . ' with the public envelope.', Logger::DEBUG);
|
||||||
|
|
||||||
// Now we should be able to import it
|
// Now we should be able to import it
|
||||||
$ret = DFRN::import($msg['message'], $importer, Conversation::PARCEL_DIASPORA_DFRN, Conversation::PUSH);
|
$ret = DFRN::import($msg['message'], $importer, Conversation::PARCEL_DIASPORA_DFRN, Conversation::RELAY);
|
||||||
System::xmlExit($ret, 'Done');
|
System::xmlExit($ret, 'Done');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,10 @@ class Conversation
|
||||||
* The message had been fetched by our system
|
* The message had been fetched by our system
|
||||||
*/
|
*/
|
||||||
const PULL = 2;
|
const PULL = 2;
|
||||||
|
/**
|
||||||
|
* The message had been pushed to this system via a relay server
|
||||||
|
*/
|
||||||
|
const RELAY = 3;
|
||||||
|
|
||||||
public static function getByItemUri($item_uri)
|
public static function getByItemUri($item_uri)
|
||||||
{
|
{
|
||||||
|
|
|
@ -297,6 +297,10 @@ class Processor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($activity['from-relay'])) {
|
||||||
|
$item['direction'] = Conversation::RELAY;
|
||||||
|
}
|
||||||
|
|
||||||
$item['isForum'] = false;
|
$item['isForum'] = false;
|
||||||
|
|
||||||
if (!empty($activity['thread-completion'])) {
|
if (!empty($activity['thread-completion'])) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user