aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-02 21:43:46 -0700
committerfriendica <info@friendica.com>2014-09-02 21:43:46 -0700
commit8337fd7bb417e73b4018bb11522e19b3b7fc705f (patch)
treef79506460a78e8d7ee396c3597c9744632ce4e52 /include
parent7001f41d3d021f1e7fb87cc3c628739bc5362d2a (diff)
downloadvolse-hubzilla-8337fd7bb417e73b4018bb11522e19b3b7fc705f.tar.gz
volse-hubzilla-8337fd7bb417e73b4018bb11522e19b3b7fc705f.tar.bz2
volse-hubzilla-8337fd7bb417e73b4018bb11522e19b3b7fc705f.zip
try to proceed with a diaspora relayable even if we don't have the original author's signature.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 2f32053f8..cd4f5591a 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2558,7 +2558,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$r = q("select * from sign where " . $sql_sign_id . " = %d limit 1",
intval($item['id'])
);
- if(count($r)) {
+ if($r) {
$orig_sign = $r[0];
$signed_text = $orig_sign['signed_text'];
$authorsig = $orig_sign['signature'];
@@ -2569,7 +2569,8 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
// whether from Diaspora or Friendica) must be placed in the `sign` table before this
// function is called
logger('diaspora_send_relay: original author signature not found, cannot send relayable');
- return;
+// ignore - see below
+// return;
}
/* Since the author signature is only checked by the parent, not by the relay recipients,
@@ -2584,11 +2585,12 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
*
*/
- if($item['author_xchan'] === $owner['channel_hash'])
- $handle = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
- else
- $handle = diaspora_handle_from_contact($item['author_xchan']);
-
+ if(! $handle) {
+ if($item['author_xchan'] === $owner['channel_hash'])
+ $handle = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
+ else
+ $handle = diaspora_handle_from_contact($item['author_xchan']);
+ }
if(! $handle) {
logger('diaspora_send_relay: no handle');
return;