forked from GNUsocial/gnu-social
Qvitter API changes (thanks hannes2peer)
I implemented changes from quitter.se's new API that their front-end qvitter uses, https://github.com/hannesmannerheim/qvitter/blob/master/api-changes-1.1.1/CHANGES However I left out the URL shortening commens, since I believe whatever behaviour they experienced that caused them to implement this was a bug (or many) and should be fixed in their proper areas and that shortening should not be entirely left out in API calls.
This commit is contained in:
@@ -148,10 +148,10 @@ class SubMirror extends Managed_DataObject
|
||||
* @param Notice $notice
|
||||
* @return mixed Notice on successful mirroring, boolean if not
|
||||
*/
|
||||
public function mirrorNotice($notice)
|
||||
public function mirrorNotice(Notice $notice)
|
||||
{
|
||||
$profile = Profile::getKV('id', $this->subscriber);
|
||||
if (!$profile) {
|
||||
if (!($profile instanceof Profile)) {
|
||||
common_log(LOG_ERR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id");
|
||||
return false;
|
||||
}
|
||||
@@ -172,9 +172,9 @@ class SubMirror extends Managed_DataObject
|
||||
* @param Notice $notice
|
||||
* @return mixed Notice on successful repeat, true if already repeated, false on failure
|
||||
*/
|
||||
protected function repeatNotice($profile, $notice)
|
||||
protected function repeatNotice(Profile $profile, Notice $notice)
|
||||
{
|
||||
if($profile->hasRepeated($notice->id)) {
|
||||
if($profile->hasRepeated($notice)) {
|
||||
common_log(LOG_INFO, "SubMirror plugin skipping auto-repeat of notice $notice->id for user $profile->id; already repeated.");
|
||||
return true;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user