Commit Graph

16893 Commits

Author SHA1 Message Date
mmn 96e0867d4c Merge branch 'master' into 'master'
update URL

bugz.foocorp.net and gitorious.net are outdated
git.gnu.io is current

See merge request !58
2015-11-05 15:05:55 +00:00
mmn 45b24286e5 Merge branch 'status-204' into 'master'
Accept 204 for PuSH subscription

Some hubs (notably, pushpress, used by wordpress.com) return 204 to mean success.

This used to be allowed by the spec, so no harm in accepting it.

See merge request !48
2015-11-05 15:03:42 +00:00
mmn f513ceac7d Merge branch 'handle-rss-guid' into 'master'
Respect isPermalLink=false on RSS guid



See merge request !49
2015-11-05 15:02:20 +00:00
mmn 5c768d7ef7 Merge branch 'twitter-verb' into 'nightly'
TwitterBridge: Add $notice->verb on import

Since /plugins/ActivityModeration::onStartNotieSave expects it to be there when calling ActivityUtils::compareVerbs. Otherwise, the following exception is unhandled:

2015-10-26 15:33:03 LOG_ERR: [sn.chromic.org:queuedaemon.php:25931] Unhandled exception: No URI to resolve in ActivityUtils::resolveUri  
 0: /lib/activityutils.php(353): ActivityUtils::resolveUri(NULL)  
 1: /lib/activityutils.php(364): ActivityUtils::compareTypes(NULL, Array)  
 2: /plugins/ActivityModeration/ActivityModerationPlugin.php(113): ActivityUtils::compareVerbs(NULL, Array)  
 3: [internal function]: ActivityModerationPlugin->onStartNoticeSave(Object(Notice))  
 4: /lib/event.php(105): call_user_func_array(Array, Array)  
 5: /plugins/TwitterBridge/lib/twitterimport.php(173): Event::handle('StartNoticeSave', Array)  
 6: /plugins/TwitterBridge/lib/twitterimport.php(72): TwitterImport->saveStatus(Object(stdClass))  
 7: /plugins/TwitterBridge/lib/tweetinqueuehandler.php(52): TwitterImport->importStatus(Object(stdClass))  
 8: /lib/dbqueuemanager.php(94): TweetInQueueHandler->handle(Array)  
 9: /lib/iomaster.php(287): DBQueueManager->poll()  
 10: /lib/iomaster.php(161): IoMaster->poll()  
 11: /scripts/queuedaemon.php(111): IoMaster->service()  
 12: /lib/spawningdaemon.php(189): QueueDaemon->runThread()  
 13: /lib/spawningdaemon.php(118): SpawningDaemon->initAndRunChild(2)  
 14: /lib/daemon.php(168): SpawningDaemon->run()  
 15: /scripts/queuedaemon.php(181): Daemon->runOnce()  
 16: {main}

See merge request !50
2015-11-05 15:01:07 +00:00
mmn 4b7c904fe0 Merge branch 'correct-author-for-repeat' into 'master'
Markup correct author for a repeat

The original author is not the author of this entry, but of the original entry.

See merge request !51
2015-11-05 15:00:35 +00:00
mmn a3ddc4ec0c Merge branch 'support-atom-namespaces-in-rss-author' into 'master'
Support more author types on RSS

Specifically, any ActivityStreams or ATOM namespaces being used on
an rss channel.

See merge request !52
2015-11-05 15:00:07 +00:00
mmn 3ca4af6868 Merge branch 'group-join' into 'nightly'
Add User_group::getObjectType

Since 174586bd51, I'm unable to join groups with the logs complaining
about getObjectType not existing on the User_group object.

Note: I'm not sure if this is the correct value to return here, but I
was able to joing groups successfully using this. Let me know if it needs
to be changed and I'll update the Merge Request!

See merge request !56
2015-11-05 14:57:29 +00:00
Matthias Fritzsche ba623d2b4e update URL
bugz.foocorp.net and gitorious.net are outdated
git.gnu.io is current
2015-11-04 12:31:23 +01:00
Stephen Paul Weber a9b1b60a97 Refactor on File::processNew
The code was so involved there was even a comment asking for a refactor.

Now, File_redirection::where always returns a nice File_redirection
object instead of an array or string or nothing.  The object is
either one which already existed or else a new, unsaved object.

Instead of duplicating "does it exist" checks everywhere, do it in
File_redirection::where.  You either get what exists or something to save.

An unsaved File_redirection may be paired with an unsaved File.
You will want to save the File first (using ->saveFile()) and put the
id in File_redirection#file_id before saving.
2015-11-02 05:15:08 +00:00
Chimo d7b58491ce Add User_group::getObjectType
Since 174586bd51, I'm unable to join groups with the logs complaining
about getObjectType not existing on the User_group object.
2015-10-29 20:11:57 -04:00
Mikael Nordfeldth 1b81131c51 Shared notices didn't save the URL 2015-10-28 00:13:17 +01:00
Stephen Paul Weber e1de6e0aa9 Support more author types on RSS
Specifically, any ActivityStreams or ATOM namespaces being used on
an rss channel.
2015-10-27 18:43:57 +00:00
Mikael Nordfeldth ebbb9a8990 Bad HTML in translation. 2015-10-27 19:05:07 +01:00
Stephen Paul Weber 54e87dd2c3 Morkup correct author for a repeat
The original author is not the author of this entry, but of the original entry.
2015-10-27 17:19:03 +00:00
Chimo 3ae81f095c TwitterBridge: Add $notice->verb on import
Since /plugins/ActivityModeration::onStartNotieSave expects it to be there when calling ActivityUtils::compareVerbs. Otherwise, the following exception is unhandled:

2015-10-26 15:33:03 LOG_ERR: [sn.chromic.org:queuedaemon.php:25931] Unhandled exception: No URI to resolve in ActivityUtils::resolveUri
 #0 /lib/activityutils.php(353): ActivityUtils::resolveUri(NULL)
 #1 /lib/activityutils.php(364): ActivityUtils::compareTypes(NULL, Array)
 #2 /plugins/ActivityModeration/ActivityModerationPlugin.php(113): ActivityUtils::compareVerbs(NULL, Array)
 #3 [internal function]: ActivityModerationPlugin->onStartNoticeSave(Object(Notice))
 #4 /lib/event.php(105): call_user_func_array(Array, Array)
 #5 /plugins/TwitterBridge/lib/twitterimport.php(173): Event::handle('StartNoticeSave', Array)
 #6 /plugins/TwitterBridge/lib/twitterimport.php(72): TwitterImport->saveStatus(Object(stdClass))
 #7 /plugins/TwitterBridge/lib/tweetinqueuehandler.php(52): TwitterImport->importStatus(Object(stdClass))
 #8 /lib/dbqueuemanager.php(94): TweetInQueueHandler->handle(Array)
 #9 /lib/iomaster.php(287): DBQueueManager->poll()
 #10 /lib/iomaster.php(161): IoMaster->poll()
 #11 /scripts/queuedaemon.php(111): IoMaster->service()
 #12 /lib/spawningdaemon.php(189): QueueDaemon->runThread()
 #13 /lib/spawningdaemon.php(118): SpawningDaemon->initAndRunChild(2)
 #14 /lib/daemon.php(168): SpawningDaemon->run()
 #15 /scripts/queuedaemon.php(181): Daemon->runOnce()
 #16 {main}
2015-10-27 10:12:33 -04:00
Stephen Paul Weber 03c68d283d Respect isPermalLink=false on RSS guid 2015-10-27 03:18:04 +00:00
Stephen Paul Weber 4c2bc465a0 Accept 204 for PuSH subscription
Some hubs (notably, pushpress, used by wordpress.com) return 204 to mean success.

This used to be allowed by the spec, so no harm in accepting it.
2015-10-27 03:16:39 +00:00
Stephen Paul Weber fae7bc0bc0 Add all link headers, not just the last one
Given the way Link headers work, it does not make any sense to
just replace all other ones.  Especially when we ourselves are adding
in a loop.
2015-10-25 18:42:37 +00:00
Stephen Paul Weber dc36621dc2 Linkback to mentioned profiles 2015-10-25 17:22:15 +00:00
Stephen Paul Weber cd22be3374 Only show parent wrapper if there are some 2015-10-23 18:51:33 +00:00
Stephen Paul Weber 8649591626 Stop incorrecly changing object_type to relative URI
All other data is using absolute URI for object_type.
2015-10-22 17:14:59 +00:00
Stephen Paul Weber 4b31bc3fd2 Enqueue renewals
Better for request times, etc
2015-10-21 01:50:03 +00:00
Stephen Paul Weber df21c3c95d Renew 1 day *before* the end, not 1 day *after* 2015-10-21 01:49:26 +00:00
Stephen Paul Weber df46f123dd Actually use the renew code
We have the code to check once a day and renew, but currently it's
just in a script directory.  This change adds an event listener
hook to check and renew subscriptions daily.
2015-10-21 01:10:48 +00:00
Stephen Paul Weber fc3f1f6942 Add direct link to parent notice
This is partly for usability, and partly to make Linkbacks for replies
work (when the plugin is enabled).
2015-10-19 18:40:40 +00:00
Stephen Paul Weber 677f0ac479 Allow users to opt out of sending linkbacks 2015-10-18 21:28:55 +00:00
abjectio 303fa91720 Removed inboxmessagelist.php - seems to be not needed. Ref. Issue #77 2015-10-18 17:34:36 +02:00
Stephen Paul Weber c7e08195e4 Fix Pingback
This code was using the HTTPRequest helpers wrong.  This commit sets the body directly instead of jamming the XML in as a POST param.
2015-10-17 13:39:46 +00:00
Stephen Paul Weber d9d74ca96c Send URL we publish
Webmention and Pingback both need the exact URL we are going to claim to link to to be present in our HTML source, so send them our actual original link.

Webmention clients are supposed to resolve this link.  Pingback clients may still fail on shortened links.
2015-10-17 13:38:13 +00:00
abjectio aa5bbdf6e5 Bug in catch(Exception) - parameter wrongly written 2015-10-16 23:48:05 +02:00
Stephen Paul Weber 3b1792c8b5 Add webmention support 2015-10-15 00:29:53 +00:00
Stephen Paul Weber e4892d21b1 Note that we should handle relative URIs 2015-10-14 16:13:25 -05:00
Stephen Paul Weber 8edc5148d9 Normalize detection helpers
Will make it easier to see what's happening when we add a third one.
2015-10-14 15:54:47 -05:00
Stephen Paul Weber 63fd35dffa Notify replies and repeats
This is especially useful for partial federation with remote accounts
that are not fully OStatus-enabled but support a pingback protocol.
Such accounts will still be notified of replies and repeats of their
content even without OStatus support, thus adding to the federated
universe.
2015-10-14 15:47:00 -05:00
Stephen Paul Weber b43294ec6f Use the getter, not a direct access 2015-10-14 15:33:48 -05:00
Stephen Paul Weber a4a37d6fc9 More robust pingback link detection 2015-10-14 15:28:38 -05:00
abjectio 626333a59e geParent() method will fail if the parent notice does not exist in the notice table. See https://quitter.no/notice/709400 2015-10-14 18:50:39 +02:00
Mikael Nordfeldth 2c8536dbf0 Link source==share notices 2015-10-14 01:30:29 +02:00
Mikael Nordfeldth 401b774c2f Only set ->actor in a case where it has not yet been set
Otherwise it could overwrite it with the wrong actor (the "second round"
for share activities)
2015-10-14 01:20:50 +02:00
Mikael Nordfeldth d260808cd3 intval for type assurance 2015-10-14 01:16:22 +02:00
Mikael Nordfeldth 79c40bc73b Type-aware comparison is necessary for Notice is_local/scope 2015-10-14 00:42:15 +02:00
Mikael Nordfeldth b6aeff89c4 Call Notice::saveActivity instead of Ostatus_profile->processActivity 2015-10-14 00:10:54 +02:00
Mikael Nordfeldth 236bf0b0f5 Remote notice creators should not have notice is_local default to LOCAL_PUBLIC 2015-10-14 00:10:01 +02:00
Mikael Nordfeldth 005c108118 Shared activities were missing the actor 2015-10-13 23:40:35 +02:00
Mikael Nordfeldth 5b307c0417 Add a url test in Notice::saveActivity 2015-10-13 23:39:40 +02:00
Mikael Nordfeldth 65adefe170 Wrong variable names in SharePlugin 2015-10-13 23:18:13 +02:00
Mikael Nordfeldth 4b69ef41e2 Bad variable name in File_redirection 2015-10-13 22:57:45 +02:00
Mikael Nordfeldth e379c49d49 Removing excess debug logging 2015-10-13 22:55:27 +02:00
Mikael Nordfeldth c8a907c828 Bookmark:addNew did not add a proper rel=related 2015-10-13 12:31:35 +02:00
Mikael Nordfeldth 3f4d4cb7a0 Better error handling in Bookmark 2015-10-12 18:28:32 +02:00