Commit Graph

2979 Commits

Author SHA1 Message Date
Zach Copley
cbf6ebae01 Merge branch 'rationalize-activity' into testing
* rationalize-activity:
  Move ActivityObject and related stuff to core
  Add PoCo bits, avatar link, geo point, etc. to person activity obj output
2010-02-22 17:12:33 -08:00
Zach Copley
6a711c6cdc Move ActivityObject and related stuff to core 2010-02-22 17:10:50 -08:00
Brion Vibber
d410df0406 OStatus group delivery initial implementation.
- added rel="ostatus:attention" links for group delivery
- added events for plugins to override group profile/permalink pages
- pulled Notice::saveGroups up to save-time so we can override;
  it's relatively cheap and gives us a clean list of target
  groups for distrib time even with customized delivery.
- fixed notice::getGroups to return group objects as expected
- added some doc on new parameters to Notice::saveNew
 - 'groups' list of group IDs to push to in place of parsing
- messages that come in via PuSH and contain local group targets
  are delivered to local group members
- messages that come in via PuSH and contain remote group targets
  are delivered to local members of the remote group

Todo:
- handle group posts that only come through Salmon
- handle conflicts in case something comes in both through Salmon and PuSH
- better source verification
- need a cleaner interface to look up groups by URI
- need a way to handle remote groups with conflicting names
2010-02-23 00:44:45 +00:00
Zach Copley
35be39e30e Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-22 01:23:24 -08:00
Zach Copley
47300a2ae9 Upgrade profile-based activity noun to have more complete set of
profile fields
2010-02-22 01:21:34 -08:00
Evan Prodromou
891e002883 don't calculate replies for remote notices 2010-02-21 23:56:48 -05:00
Brion Vibber
3c61f45de1 Merge branch 'master' of gitorious.org:statusnet/mainline into testing 2010-02-21 18:56:41 -08:00
Zach Copley
10281d59f4 Add PoCo namespace to notice feeds 2010-02-21 14:43:28 -08:00
Evan Prodromou
ab3db8c899 Combine code that finds mentions into one place and add hook points
Combined the code that finds mentions of other profiles into one place.

common_find_mentions() finds mentions and calls hooks to allow
supplemental syntax for mentions (like OStatus).

common_linkify_mentions() links mentions.

common_linkify_mention() links a mention.

Notice::saveReplies() now uses common_find_mentions() instead of
trying to parse everything again.
2010-02-21 16:20:30 -05:00
Evan Prodromou
d5ba9e1b10 add feed-level author for user atom feeds 2010-02-21 13:03:13 -05:00
Evan Prodromou
f3b08461bd Change to use TagURI::base() instead of common_config()
I changed the way that tag: URIs are minted, so we now use the right
base. Ideally most of these would use HTTP URIs instead, but for
now at least they use the right base.
2010-02-20 13:31:20 -05:00
Evan Prodromou
61a072b3c4 Add a library to mint tag URIs
We've been making pretty crummy tag: URIs for a while. We should
continue to favor HTTP URIs, since it's nice to be able to discover
things about an object you've shared the ID of. Where that's not
possible, this makes nicer tag URIs.
2010-02-20 13:23:08 -05:00
Evan Prodromou
d69f6dff6a Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Conflicts:
	plugins/OStatus/actions/salmon.php
2010-02-19 16:55:24 -05:00
Evan Prodromou
512e8b69f1 remove unused subs_(un)subscribe_user functions 2010-02-19 08:31:46 -05:00
Evan Prodromou
b0a75a2ab2 replace calls to subs_(un)subscribe_user with Subscription methods 2010-02-19 08:31:20 -05:00
Sarven Capadisli
2c09702b2d Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-19 14:22:25 +01:00
Evan Prodromou
52e8aa798a Refactor subs_* functions for remote use
The subs_* functions in subs.php have made a lot of assumptions
about users versus profiles. I've refactored the functions to
be methods of the Subscription class instead, and to use Profile
objects throughout.

Some of the checks for blocks or existing subscriptions depended
on users or profiles, so I've moved those methods around a bit.

I've left stubs for the subs_* functions until we get time to replace
them.
2010-02-19 08:16:45 -05:00
Sarven Capadisli
8d59f7cc9d Using inlineScript instead for clickjacking check 2010-02-19 13:13:05 +01:00
Sarven Capadisli
b03c7a383f Only load json2.js if native JSON is not supported 2010-02-19 13:03:26 +01:00
Brion Vibber
22ff358ba8 OStatus sub/unsub updates:
- fix for PuSH unsub verification
- send Salmon notification on unsub
2010-02-18 18:20:48 +00:00
Zach Copley
5253a99d7a Merge branch 'master' of git@gitorious.org:statusnet/mainline 2010-02-18 01:48:41 +00:00
Zach Copley
1aeca3947d Fix for cross site OMB posting problem 2010-02-18 01:48:24 +00:00
Brion Vibber
07f145049e Merge branch 'master' into testing 2010-02-17 16:52:13 -08:00
Brion Vibber
ce6be4f836 Queues: redid the breakout control model so we can start up and subscribe to queues without running through the complete site list, which is ok at 1k sites but too slow at 10k.
All breakout queues that we're going to need to listen to now need to be explicitly listed in $config['queue']['breakout'].

Until XMPP is moved to component model, this setting will let the individual processes work with their own queues:
$config['queue']['breakout'][] = 'xmpp/xmppout/' . $config['site']['nickname'];
2010-02-17 16:49:00 -08:00
Zach Copley
c201baffbf Upgrade Twitter bridge to use OAuth 1.0a. It's more secure, and allows
us to automatically send in a callback url instead of having to manually
configure one for each StatusNet instance.
2010-02-17 20:58:15 +00:00
Brion Vibber
3cb6b1670b Merge branch 'master' into testing 2010-02-17 10:13:35 -08:00
Brion Vibber
e8275aa60a Fix exception on bad plugin load 2010-02-17 10:12:37 -08:00
Craig Andrews
8e07926a9c parse_url returns an associative array - not an object 2010-02-17 10:10:07 -08:00
Brion Vibber
e51e96d724 OStatus: override source link with the source domain and link to original message 2010-02-17 02:16:03 +00:00
Brion Vibber
81b6b58e33 Merge branch 'master' into testing
Conflicts:
	lib/stompqueuemanager.php
2010-02-16 09:22:02 -08:00
Brion Vibber
c74aea589d Stomp queue restructuring for mass scalability:
- Multiplexing queues into groups and for multiple sites.
- Sharing vs breakout configurable per site and per queue via $config['queue']['breakout']
- Detect how many times a message is redelivered, discard if it's killed too many daemons
 - count configurable with $config['queue']['max_retries']
 - can dump the items to files in $config['queue']['dead_letter_dir']

Queue daemon memory & resource leak fixes:
- avoid unnecessary reconnections to memcached server (switch persistent connections back in on second initialization, assuming it's child process)
- monkey-patch for leaky .ini loads in DB_DataObject::databaseStructure() - was leaking 200k per active switch
- applied leak fixes to Status_network as well, using intermediate base Safe_DataObject for both it and Memcache_DataObject

Misc queue fixes:
- correct handling of child processes exiting due to signal termination instead of regular exit
- shutdown instead of infinite respawn loop if we're already past the soft memory limit at startup
- Added --all option for xmppdaemon... still opens one xmpp connection per site that has xmpp active

Cache updates:
- add Cache::increment() method with native support for memcached atomic increment
2010-02-16 09:16:51 -08:00
Brion Vibber
3d0c3f0577 Pull fix from testing branch: use new encoding funcs w/ stomp queues 2010-02-16 09:15:29 -08:00
Evan Prodromou
a8c2a8261e move some nickname-guessing code to lib/util.php from OpenID 2010-02-16 11:06:10 -05:00
Zach Copley
f414544d0d Upgrade Twitter bridge to use OAuth 1.0a. It's more secure, and allows
us to automatically send in a callback url instead of having to manually
configure one for each StatusNet instance.
2010-02-16 06:12:08 +00:00
Sarven Capadisli
350f90eedc Added another single whitespace 2010-02-15 21:21:25 +01:00
Sarven Capadisli
03edbfe24e Added single whitespace to separate inline text words. 2010-02-15 20:41:46 +01:00
Sarven Capadisli
9465a4d5c6 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-13 20:28:39 +01:00
Sarven Capadisli
fc19179bc5 Added event hook to remote subscription 2010-02-13 18:40:36 +01:00
Evan Prodromou
269b4711eb Merge branch 'ssleverything' into testing 2010-02-13 12:39:15 -05:00
Zach Copley
f3a82e787c Add OStatus PuSH hub and Salmon links back into user and group feeds 2010-02-12 19:02:27 -08:00
Brion Vibber
38f42d56bc Session fix for PHP 5.3 configurations where cookies are excluded from $_REQUEST via request_order in php.ini (Fedora 12, MacPorts known to be affected) 2010-02-12 15:24:15 -08:00
Zach Copley
506c2d7491 Initial upgraded Atom output for group timelines 2010-02-12 12:24:29 -08:00
Evan Prodromou
31461e120f let files go to SSL dir too 2010-02-11 17:06:57 -05:00
Evan Prodromou
3018683718 let backgrounds be put under SSL 2010-02-11 17:03:31 -05:00
Evan Prodromou
b96af33d97 put Javascript files under SSL 2010-02-11 16:59:39 -05:00
Zach Copley
c465f675d9 Make Atom timelines in the API use Atom10feed 2010-02-11 13:56:05 -08:00
Zach Copley
c8d5c8442f Added some boilerplate class comments, etc. 2010-02-11 13:56:05 -08:00
Zach Copley
e2c0f59414 Some upgrades to Atom output for OStatus 2010-02-11 13:56:05 -08:00
Zach Copley
ce3c3be1bf Utility classes for atom feeds 2010-02-11 13:56:05 -08:00
Evan Prodromou
d6869cde7b let avatars be served over SSL 2010-02-11 16:51:15 -05:00
Evan Prodromou
5175b5062e default theme ssl to null 2010-02-11 16:48:15 -05:00
Evan Prodromou
316ed3f86b null theme ssl setting means 'guess' 2010-02-11 16:47:47 -05:00
Evan Prodromou
a6ab9c4a3e Themes can be served from an SSL server 2010-02-11 16:42:58 -05:00
Brion Vibber
045797331c fix up hub queueing to work w/ stomp queues 2010-02-10 12:27:41 -08:00
Brion Vibber
c4557d4d07 Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing 2010-02-10 11:12:11 -08:00
Brion Vibber
d9c9b2a12f Queue daemon fixes:
* skip unnecessary unsubscribes on graceful shutdown -- takes a long time for many queues, slows down our restarts when hitting graceful mem limit
* fix control channel (was broken when we switched to support multiple queue servers)
2010-02-10 10:59:30 -08:00
Brion Vibber
8449256817 OStatus partial support for group subscriptions:
* detection of group feeds is currently a nasty hack based on presence of '/groups/' in URL -- should use some property on the feed?
* listing for the remote group is kinda cruddy; needs to be named more cleanly
* still need to establish per-author profiles (easier once we have the updated Atom code in)
* group delivery probably not right yet
* saving of group messages still triggering some weird behavior

Added support for since_id and max_id on group timeline feeds as a free extra. Enjoy!
2010-02-09 18:32:52 -08:00
Brion Vibber
e856af34c3 Configurable delay between queuedaemon.php spawns/respawns to help stagger out startups and subscriptions. Defaults to 1 second.
$config['queue']['spawndelay'] = 1;
2010-02-09 14:27:33 -08:00
Brion Vibber
cd0f288fa7 Configurable delay between queuedaemon.php spawns/respawns to help stagger out startups and subscriptions. Defaults to 1 second.
$config['queue']['spawndelay'] = 1;
2010-02-09 12:39:31 -08:00
Brion Vibber
384387c9b0 OStatus cleanup...
* Treat linkless feed posts as status updates; drop the "New post:" prefix and quotes on them.
* Use stable user IDs for atom/rss2 feed links instead of unstable nicknames
* Pull Atom feed preferentially when subscribing -- can now put the remote user's profile page straight into the feed subscription form and get to the right place.
* Clean up naming for push endpoints
2010-02-08 14:58:12 -08:00
Evan Prodromou
9cac8eaae5 readme and version for beta5 2010-02-08 14:07:31 -08:00
Brion Vibber
dc09453a77 First steps on converting FeedSub into the pub/sub basis for OStatus communications:
* renamed FeedSub plugin to OStatus
* now setting avatar on subscriptions
* general fixes for subscription
* integrated PuSH hub to handle only user timelines on canonical ID url; sends updates directly
* set $config['feedsub']['nohub'] = true to test w/ foreign feeds that don't have hubs (won't actually receive updates though)
* a few bits of code documentation
* HMAC support for verified distributions (safest if sub setup is on HTTPS)

And a couple core changes:
* minimizing HTML output for exceptions in API requests to aid in debugging
* fix for rel=self link in apitimelineuser when id given

This does not not yet include any of the individual subscription management (Salmon notifications for sub/unsub, etc) nor a nice UI for user subscriptions.
Needs some further cleanup to treat posts as status updates instead of link references.
2010-02-08 11:15:29 -08:00
Evan Prodromou
6e5809586f Move authorization for admin panels to AdminPanelAction class 2010-02-06 16:32:50 +01:00
Evan Prodromou
5fdcd88176 Moderator can make users admins of a group 2010-02-06 11:36:59 +01:00
Brion Vibber
875e1a70ce Don't spew warnings on usage of MEMCACHE_COMPRESSED constant when memcache PHP extension is not present.
Switched to a locally-defined Cache::COMPRESSED, translating that to MEMCACHE_COMPRESSED in the plugin.
2010-02-05 09:47:56 -08:00
Zach Copley
23802e58d6 Merge branch 'temp' 2010-02-05 03:19:12 +00:00
Zach Copley
857494c9c6 Actually store the timestamp on each nonce 2010-02-05 03:18:45 +00:00
Zach Copley
4041a59282 Always check for an OAuth request. This allows OAuth clients to set an
auth user, similar to how they can set one via http basic auth,
even if one is not required.  I think I finally got this right.
2010-02-05 03:18:44 +00:00
Zach Copley
5417124884 Linkify notice source when posting from registered OAuth apps 2010-02-05 03:18:44 +00:00
Zach Copley
b31c79cee1 Better token revocation 2010-02-05 03:18:43 +00:00
Zach Copley
e495ac356c Allow developers to delete OAuth applications 2010-02-05 03:18:43 +00:00
Zach Copley
8d320d7cc2 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-05 02:08:37 +00:00
Zach Copley
10dfcde0b2 Actually store the timestamp on each nonce 2010-02-05 01:38:29 +00:00
Brion Vibber
a020e23086 Merge branch 'master' of gitorious.org:statusnet/mainline into testing 2010-02-04 11:56:07 -08:00
Brion Vibber
5a1cbdc6f1 Add time-based cutoffs for public tag cloud, favorited lists to speed up those queries.
Defaulting to only looking at last 90 days of activity, can be adjusted up or down.

$config['tag']['cutoff'] = 86400 * 90;
$config['popular']['cutoff'] = 86400 * 90;

Per-user and per-group tag clouds do not use the cutoff (and it doesn't help with indexing on them).
2010-02-04 11:06:01 -08:00
Zach Copley
2085b506d4 Always check for an OAuth request. This allows OAuth clients to set an
auth user, similar to how they can set one via http basic auth,
even if one is not required.  I think I finally got this right.
2010-02-02 23:17:28 +00:00
Zach Copley
dae28d98d1 Linkify notice source when posting from registered OAuth apps 2010-02-02 08:51:01 +00:00
Zach Copley
8191273078 Better token revocation 2010-02-02 08:50:33 +00:00
Zach Copley
f0875ceea1 Allow developers to delete OAuth applications 2010-02-02 08:50:18 +00:00
Evan Prodromou
f964357de9 readme and version for beta5 2010-02-01 13:44:06 -05:00
Brion Vibber
fba4153346 Don't enqueue into plugin or SMS queues when disabled (breaks unqueuehandler if SMS queue isn't attached) 2010-02-01 10:16:19 -08:00
Evan Prodromou
81087e45c5 move schema.type.php to typeschema.php like other files 2010-01-31 15:25:59 -05:00
Evan Prodromou
ebf4e497f6 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-01-31 15:20:57 -05:00
Evan Prodromou
30268cff78 Add Really Simple Discovery (RSD) support
Anil Dash suggested that all implementers of the Twitter API include
support for the remedial RSD format. This commit adds an RSD action
that returns the API root and additional API data to help client
developers discover and use our Twitter-compatible API.

http://dashes.com/anil/2009/12/the-twitter-api-is-finished.html
http://tales.phrasewise.com/rfc/rsd
2010-01-31 15:16:59 -05:00
Evan Prodromou
dc62246443 Add a robots.txt URL to the site root
Adds a robots.txt file to the site root. Defaults defined by
'robotstxt' section of config. New events StartRobotsTxt and
EndRobotsTxt to let plugins add information. Probably not
useful if path is not /, but won't hurt anything, either.
2010-01-31 10:12:26 -05:00
Evan Prodromou
4ae31f3476 on exceptions, stomp logs the error and reenqueues 2010-01-30 13:15:17 -05:00
Brenda Wallace
22a6e46b45 removed describeTable from base class, and fixed it up in pgsql 2010-01-30 21:22:30 +13:00
Brenda Wallace
870c83c17d getTableDef() mostly working in postgres 2010-01-30 21:12:06 +13:00
Brenda Wallace
e765a9657b move the schema DDL sql off into seperate files for each db we support 2010-01-30 18:45:10 +13:00
Evan Prodromou
a7b2a08c42 for single-user mode, retrieve either site owner or defined nickname 2010-01-29 15:15:52 -05:00
Brion Vibber
4d3808a815 Fix more fatal errors in queue edge cases 2010-01-28 23:08:36 -08:00
Brion Vibber
e5eca9bd2c Don't attempt to resend XMPP messages that can't be broadcast due to the profile being deleted. 2010-01-28 22:51:07 -08:00
Brion Vibber
990b0f7995 Merge branch 'master' of git@gitorious.org:statusnet/mainline 2010-01-28 22:29:26 -08:00
Brion Vibber
ccb678ad15 Wrap each bit of distrib queue handler's saving operation in a try/catch; log exceptions but let everything else continue. 2010-01-28 22:26:58 -08:00
Zach Copley
440ee00b1e Move sessions settings to its own panel 2010-01-28 22:04:14 -08:00
Zach Copley
292ac40cae Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-01-29 01:53:11 +00:00
Zach Copley
48a1a5a2dc Adjust API authentication to also check for OAuth protocol params in the
HTTP Authorization header, as defined in OAuth HTTP Authorization Scheme.
2010-01-29 01:49:38 +00:00
Brion Vibber
155a5d446f Manual failover for stomp queues.
If an array of multiple servers is put in $config['queue']['stomp_server'], enqueues will pick a random server to send to (failing over automatically if any are down).
Queue handling daemons connect all servers so they get events no matter where they were delivered.
In case of disconnection, daemons should now handle it gracefully and attempt to reconnect every 60 seconds or so, automatically resubscribing to all queues once it's back up.

Can put to 'native' failover for reads as well by disabling $config['stomp']['manual_failover'] = false; but this is untested and may explode in addition to requiring that your ActiveMQ cluster actually be set up to handle its own data distribution.

Additionally, can choose which queues to mark as persistent by setting $config['stomp']['persistent'] to an array of queue names.
2010-01-28 16:49:32 -08:00
Brion Vibber
d00ce38549 Merge commit 'origin/master' into testing 2010-01-28 13:35:09 -08:00
Zach Copley
d773ed8193 Remove redundant session token field from form (was already being added by base class). 2010-01-28 18:36:30 +00:00