mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 04:15:12 +00:00
edited event showing bad signature and null_date for edit timestamp
This commit is contained in:
parent
eac9c8a7e6
commit
d256e8e9f2
2 changed files with 12 additions and 1 deletions
|
@ -778,7 +778,12 @@ function event_store_item($arr, $event) {
|
|||
|
||||
$private = (($arr['allow_cid'] || $arr['allow_gid'] || $arr['deny_cid'] || $arr['deny_gid']) ? 1 : 0);
|
||||
|
||||
q("UPDATE item SET title = '%s', body = '%s', object = '%s', allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', edited = '%s', item_flags = %d, item_private = %d, obj_type = '%s' WHERE id = %d AND uid = %d",
|
||||
// @FIXME can only update sig if we have the author's channel on this site
|
||||
// Until fixed, set it to nothing so it won't give us signature errors
|
||||
|
||||
$sig = '';
|
||||
|
||||
q("UPDATE item SET title = '%s', body = '%s', object = '%s', allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s', edited = '%s', sig = '%s', item_flags = %d, item_private = %d, obj_type = '%s' WHERE id = %d AND uid = %d",
|
||||
dbesc($arr['summary']),
|
||||
dbesc($prefix . format_event_bbcode($arr)),
|
||||
dbesc($object),
|
||||
|
@ -787,6 +792,7 @@ function event_store_item($arr, $event) {
|
|||
dbesc($arr['deny_cid']),
|
||||
dbesc($arr['deny_gid']),
|
||||
dbesc($arr['edited']),
|
||||
dbesc($sig),
|
||||
intval($r[0]['item_flags']),
|
||||
intval($private),
|
||||
dbesc(ACTIVITY_OBJ_EVENT),
|
||||
|
|
|
@ -132,6 +132,10 @@ function events_post(&$a) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$created = $x[0]['created'];
|
||||
$edited = datetime_convert();
|
||||
|
||||
if($x[0]['allow_cid'] === '<' . $channel['channel_hash'] . '>'
|
||||
&& $x[0]['allow_gid'] === '' && $x[0]['deny_cid'] === '' && $x[0]['deny_gid'] === '') {
|
||||
$share = false;
|
||||
|
@ -150,6 +154,7 @@ function events_post(&$a) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
$created = $edited = datetime_convert();
|
||||
if($share) {
|
||||
$str_group_allow = perms2str($_POST['group_allow']);
|
||||
$str_contact_allow = perms2str($_POST['contact_allow']);
|
||||
|
|
Loading…
Reference in a new issue