Commit Graph

386 Commits

Author SHA1 Message Date
Brion Vibber
5f5d9518bd Avoid spewing giant debug backtrace into exception in certain OStatus subscription failure cases.
The code pattern 'new XXXException($e)' to chain exceptions doesn't actually work as intended, as exceptions are actually expecting a string message here.
This caused an implicit string conversion from HTTP_Request2_Exception, which is a PEAR_Exception, which defines an absurdly detailed __toString() method including a giant HTML table with a backtrace if you happen to be on a web request.
Simply passing $e->getMessage() instead clears this up, as we'll get the nice short message like 'Couldn't connect to tcp://blahblah:80'
2010-05-04 17:11:43 -07:00
Brion Vibber
67eeaa9cf4 Pull localization updates from 0.9.x branch 2010-05-03 12:27:44 -07:00
Brion Vibber
ae2986527c Pull localization updates from 0.9.x 2010-04-29 15:52:10 -07:00
Brion Vibber
9c8052e755 Rerun feed discovery and update the feed, salmon, and hub for the given OStatus remote profile. Restarts subscription fresh as well.
update-profile.php -sexample.com http://example.com/path/to/profile/url
2010-04-23 12:54:31 -07:00
Brion Vibber
fd9d520aeb OStatus: CLI script to force a renewal on the given PuSH subscription. May help when we get out of sync with the hub.
php plugins/OStatus/scripts/resub-feed.php -smysite http://example.com/some/atom/feed
2010-04-22 06:14:40 +02:00
Evan Prodromou
a129c455a2 Fix exceptions with bad gravatar URLs 2010-04-21 18:19:16 -07:00
Brion Vibber
acea534044 Disable the send-notice form at the top of the page OStatus subscription confirmation page to work around bugs in Cloudy theme.
This is really just a hack for the broken CSS in the Cloudy theme, I think; copying from other non-notice-navigation pages that do this as well. There will be plenty of others also broken.
2010-04-19 19:45:01 +02:00
Brion Vibber
d352e5f5c4 Handle attempt to subscribe a local user via their remote webfinger reference more gracefully.
The ensure* family of functions will now return an OStatusShadowException in this case, which gives us a pleasant error message instead of a giant exception backtrace when you do 'sub somebody@this.local.server'.

Can be extended later to allow actually using the local profile, since we could figure it out.
2010-04-06 16:35:24 -07:00
Brion Vibber
3ac3bc32fc Some localization cleanup and doc to aid in customization:
* added locale/en/LC_MESSAGES/statusnet.po to make it easier to start customizing English texts
* added notes to locale/README about customizing and how to disable languages you haven't customized
* renamed PO templates from *.po to *.pot to match general conventions and reduce confusion for people trying to find which file they're supposed to edit
2010-04-05 13:19:16 -07:00
Brion Vibber
dbaa93d1aa Clean up and clarify output on fix-shadow.php 2010-04-05 11:21:17 -07:00
Brion Vibber
6046a6cc6a Include meta charset header in saved HTML file for long OStatus messages; without, DOMDocument::loadHTML assumed Latin-1 instead of UTF-8. 2010-03-29 16:29:57 -07:00
James Walker
3227122ac3 move base64_url_(encode|decode) to static functions in Magicsig 2010-03-26 10:43:41 -07:00
Evan Prodromou
75b2bf2a4e Do ostatus queue first
We do the OStatus queue first, so if we're sending a notice to the
same server twice (e.g., with OMB), our richer and more featureful
notice comes in first.
2010-03-26 08:45:23 -04:00
Brion Vibber
e91bf2b8a9 Tweak to OStatus long message cropping: use original source notice URL for the link in the text version, don't shorten the link for the HTML so we can append params to it in JS.
Conflicts:

	plugins/OStatus/classes/Ostatus_profile.php
2010-03-25 16:08:09 -07:00
Brion Vibber
013647f0ba Add doc comments on saveHTMLFile; drop the extra <div> wrapping the contents to make it easier to extract without getting extra markup. 2010-03-25 23:11:06 +01:00
Sarven Capadisli
8336e24179 Using &#8230; (hellip) instead of "more" for link text 2010-03-25 22:18:21 +01:00
Brion Vibber
c11064a539 Updated 'more' anchor for attachments to do an XHR GET
Conflicts:

	lib/attachmentlist.php
	plugins/OStatus/classes/Ostatus_profile.php

Merge tried to delete things that it seems it shouldn't, very confusing order. Hope rest of the cherry-picking isn't a problem.
2010-03-25 14:15:54 -07:00
James Walker
9e0b9857f4 Make sure we're requiring the library 2010-03-24 15:26:03 -04:00
James Walker
cfca789b34 Updated Math_Biginteger from upstream - removing safe* workarounds 2010-03-24 15:18:41 -04:00
James Walker
c4273f0ef3 Check for 0.9.0 bad keys from old Crypt_RSA library 2010-03-24 15:15:20 -04:00
James Walker
10410907a0 A bit safer checking in the keypair parsing 2010-03-24 14:27:35 -04:00
Zach Copley
7b1b6045e6 Look for the first object in the Activity 2010-03-24 00:00:55 -07:00
Brion Vibber
fcf86b4fdf Improve legibility of OStatus remote tests output 2010-03-23 18:56:40 -07:00
Brion Vibber
9380eed794 add a general PuSHed post and an @-reply back to a subscribee by name to OStatus remote test cases 2010-03-23 18:44:54 -07:00
Brion Vibber
df8c9090c0 Add basic subscribe/unsubscribe test to OStatus test cases 2010-03-23 14:19:12 -07:00
Brion Vibber
5f32cf32cd Don't spew XML parse warnings to output when checking a remote XRD page 2010-03-23 14:18:45 -07:00
Zach Copley
5b0b6097e0 Fix reference. Look at the first ActivityObject in the list. 2010-03-22 21:48:21 -07:00
Zach Copley
b8e97ac709 Some initial media parsing
- Activity now returns a list of activity objects
- Processing of photo objects
2010-03-22 18:55:17 -07:00
Brion Vibber
3678e7b89b OStatus remote sending test cases. Doesn't actually run within PHPUnit right now, must be run from command line -- specify base URLs to two StatusNet sites that will be able to communicate with each other.
Current test run includes:
* register accounts (via web form)
* local post
* @-mention using path (@domain/path/to/user)

Subscriptions, webfinger mentions, various paths to subscription and unsubscription, etc to come.
2010-03-22 17:01:50 -07:00
Brion Vibber
27bfd1211d Math_BigInteger doesn't correctly handle serialization/deserialization for a value of 0, which can end up spewing notices to output and otherwise intefering with Salmon signature setup and verification when using memcached.
Worked around this with a subclass that fixes the wakeup, used for the stored 0 value in the subclassed Crypt_RSA.
2010-03-22 12:17:45 -07:00
Brion Vibber
3bb639699c Confirm there's actually user and domain portions of acct string before assigning things from output of explode(); avoids notice message when invalid input passed to main/xrd 2010-03-22 11:27:39 -07:00
James Walker
a20880ee1e Fixing HTTP Header LRDD parsing (sites in subdirectories need this) 2010-03-22 13:45:13 -04:00
Evan Prodromou
edee1fc09e ignore unrecognized object types 2010-03-22 08:17:14 -04:00
Brion Vibber
fcb614d0eb Pull <atom:author> info as well as <activity:actor> when we have an old-style ActivityStreams feed. This fixes subscription setup for Cliqset feeds, which currently have a bogus activity:actor/atom:id but a good atom:author/atom:uri 2010-03-21 16:25:12 -07:00
Brion Vibber
b228da628d Accept 'tag' and other non-http id URIs in Ostatus_profile::getActivityObjectProfileURI().
(If there's not a valid ID we fall back to the link, which we do still validate as http/s.)
2010-03-21 15:46:28 -07:00
Brion Vibber
5d3bce49b8 OStatus profile setup cleanup
* drop OStatusPlugin::localProfileFromUrl(), we can just look up on user.uri
* clean up a few edge cases that returned null through Ostatus_profile::ensure* code paths, now throws clear exception when we can't find a feed from the given profile url
* add some doc comments on the ensure* methods
2010-03-21 15:18:37 -07:00
Evan Prodromou
0f1f7ab79b only use Posterous author data if it matches the profile URL 2010-03-21 07:37:58 -05:00
Evan Prodromou
c2afdfbbf5 use Posterous element if available for RssChannel discovery 2010-03-20 17:18:55 -05:00
Evan Prodromou
fb2b45c68a use feedEl for discovery 2010-03-20 09:46:22 -05:00
Evan Prodromou
515acb8513 fall back to summary or title if content not available 2010-03-20 09:30:57 -05:00
Evan Prodromou
25cb917523 Allow PuSH posts without author information
Superfeedr (sp.?) posts entries without author information. We can
assume that this is intended to be by the original author.
Re-structured the checks for entries that come in by PuSH so they can
either have no author or an empty author, but not a different author.
2010-03-20 08:25:56 -05:00
Evan Prodromou
f558508784 handle RSS as well as Atom in Ostatus push hits 2010-03-20 07:23:13 -05:00
Evan Prodromou
c0f6572001 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-03-20 06:44:55 -05:00
Evan Prodromou
51283a1b34 try to make a nickname from the user profile url before using the URI 2010-03-20 06:44:38 -05:00
Brion Vibber
db0cf50f65 Avoid notices for accessing undefined array indices in hcard processing 2010-03-19 15:54:54 -07:00
Brion Vibber
c84c4c6839 OStatus: be a little laxer about attempts to start/stop PuSH subscriptions that were left in an inconsistent state.
Instead of aborting, we'll try to reconfirm the sub/unsub, which once confirmed will replace whatever the previous state was on the server side.
2010-03-19 15:47:43 -07:00
Brion Vibber
79ec565104 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-03-19 15:29:00 -07:00
Evan Prodromou
db9e57f761 ensure from an RSS channel 2010-03-19 15:50:06 -05:00
Evan Prodromou
5092f98c0d return empty hints if no hcard in the html 2010-03-19 15:28:06 -05:00
Evan Prodromou
1e03968d91 define a 'root' attribute for the channel or feed 2010-03-19 15:23:30 -05:00