Merge branch 'dev' into 'dev'
improved conversion of emoji reactions from zot to zot6 See merge request hubzilla/core!1720
This commit is contained in:
commit
914a096b42
@ -516,6 +516,25 @@ class Activity {
|
|||||||
xchan_query($p,true);
|
xchan_query($p,true);
|
||||||
$p = fetch_post_tags($p,true);
|
$p = fetch_post_tags($p,true);
|
||||||
$i['obj'] = self::encode_item($p[0]);
|
$i['obj'] = self::encode_item($p[0]);
|
||||||
|
|
||||||
|
// convert to zot6 emoji reaction encoding which uses the target object to indicate the
|
||||||
|
// specific emoji instead of overloading the verb or type.
|
||||||
|
|
||||||
|
$im = explode('#',$i['verb']);
|
||||||
|
if($im && count($im) > 1)
|
||||||
|
$emoji = $im[1];
|
||||||
|
if(preg_match("/\[img(.*?)\](.*?)\[\/img\]/ism", $i['body'], $match)) {
|
||||||
|
$ln = $match[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
$i['tgt_type'] = 'Image';
|
||||||
|
|
||||||
|
$i['target'] = [
|
||||||
|
'type' => 'Image',
|
||||||
|
'name' => $emoji,
|
||||||
|
'url' => (($ln) ? $ln : z_root() . '/images/emoji/' . $emoji . '.png')
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,6 +299,11 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
|
|||||||
$r = q("delete from pgrp_member where xchan = '%s'",
|
$r = q("delete from pgrp_member where xchan = '%s'",
|
||||||
dbesc($xchan)
|
dbesc($xchan)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Cannot delete just one side of the conversation since we do not allow
|
||||||
|
// you to block private mail replies. This would leave open a gateway for abuse.
|
||||||
|
// Both participants are owners of the conversation and both can remove it.
|
||||||
|
|
||||||
$r = q("delete from mail where ( from_xchan = '%s' or to_xchan = '%s' )",
|
$r = q("delete from mail where ( from_xchan = '%s' or to_xchan = '%s' )",
|
||||||
dbesc($xchan),
|
dbesc($xchan),
|
||||||
dbesc($xchan)
|
dbesc($xchan)
|
||||||
|
Reference in New Issue
Block a user