forked from GNUsocial/gnu-social
Don't do saveKnownReplies unless it's a verb=post
This commit is contained in:
parent
66289d3e76
commit
7cf6aaecd0
@ -685,8 +685,10 @@ class Notice extends Managed_DataObject
|
||||
// Clear the cache for subscribed users, so they'll update at next request
|
||||
// XXX: someone clever could prepend instead of clearing the cache
|
||||
|
||||
// Save per-notice metadata...
|
||||
|
||||
// Only save 'attention' and metadata stuff (URLs, tags...) stuff if
|
||||
// the activityverb is a POST (since stuff like repeat, favorite etc.
|
||||
// reasonably handle notifications themselves.
|
||||
if (ActivityUtils::compareVerbs($stored->verb, array(ActivityVerb::POST))) {
|
||||
if (isset($replies)) {
|
||||
$notice->saveKnownReplies($replies);
|
||||
} else {
|
||||
@ -710,6 +712,7 @@ class Notice extends Managed_DataObject
|
||||
} else {
|
||||
$notice->saveUrls();
|
||||
}
|
||||
}
|
||||
|
||||
if ($distribute) {
|
||||
// Prepare inbox delivery, may be queued to background.
|
||||
@ -965,6 +968,10 @@ class Notice extends Managed_DataObject
|
||||
// Used primarily for OStatus (and if we don't federate, all attentions would be local anyway)
|
||||
Event::handle('GetLocalAttentions', array($actor, $act->context->attention, &$mentions, &$group_ids));
|
||||
|
||||
// Only save 'attention' and metadata stuff (URLs, tags...) stuff if
|
||||
// the activityverb is a POST (since stuff like repeat, favorite etc.
|
||||
// reasonably handle notifications themselves.
|
||||
if (ActivityUtils::compareVerbs($stored->verb, array(ActivityVerb::POST))) {
|
||||
if (!empty($mentions)) {
|
||||
$stored->saveKnownReplies($mentions);
|
||||
} else {
|
||||
@ -988,6 +995,7 @@ class Notice extends Managed_DataObject
|
||||
} else {
|
||||
$stored->saveUrls();
|
||||
}
|
||||
}
|
||||
|
||||
if ($distribute) {
|
||||
// Prepare inbox delivery, may be queued to background.
|
||||
@ -1615,12 +1623,6 @@ class Notice extends Managed_DataObject
|
||||
|
||||
function saveReplies()
|
||||
{
|
||||
// Don't save reply data for repeats
|
||||
|
||||
if ($this->isRepeat()) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$sender = $this->getProfile();
|
||||
|
||||
$replied = array();
|
||||
|
Loading…
Reference in New Issue
Block a user