Commit Graph

80 Commits

Author SHA1 Message Date
Evan Prodromou
c86f0ffa2f Avoid slurping objects recursively in activity parsing 2011-07-19 16:18:29 -04:00
Evan Prodromou
22b565a937 special case for parsing embedded activities in SHARE verb 2011-07-19 16:02:28 -04:00
Evan Prodromou
4a6f576478 'type' => 'objectType' for embedded activities 2011-07-18 17:42:28 -04:00
Evan Prodromou
d277f343ca Encode repeats as share activities 2011-07-18 17:06:03 -04:00
Brion Vibber
da7c54023d Format timestamps as UTC in ActivityStreams output. While using local times is legit per spec, it's confusing to have it change around and confuses some clients that don't handle zones right. 2011-03-30 12:36:54 -07:00
Zach Copley
b741184d9b Add provider to Activity Streams JSON 2011-02-18 18:10:21 -08:00
Zach Copley
da42d36d7f Activity Streams JSON - express to and in-reply-to stuff as person objects 2011-02-18 10:02:41 -08:00
Zach Copley
20e414665d Add tags to Activity Streams JSON 2011-02-18 09:29:49 -08:00
Zach Copley
60f62199a1 Add context to Activity Streams JSON 2011-02-18 00:51:08 -08:00
Zach Copley
97af5e1954 Add geopoint (GeoJSON) extension to AS JSON output 2011-02-17 20:12:28 -08:00
Zach Copley
29ce5dd19a Reinstate profile_info in author/actor 2011-02-17 19:02:57 -08:00
Zach Copley
a199192ebf Add avatars and notice info 2011-02-16 18:55:13 -08:00
Zach Copley
b1675ff175 Rudimentary support for enclosures and some fiddling 2011-02-16 18:14:58 -08:00
Zach Copley
ddda31038e Use simple relative object and verb references 2011-02-16 16:44:02 -08:00
Zach Copley
e4d5c47ebf Add image to JSON ActivityObject and title + links to the JSON document 2011-02-16 16:21:46 -08:00
Zach Copley
a1b436a8c6 First cut at some JSON Activity Streams output 2011-02-15 20:25:39 -08:00
Evan Prodromou
ff2553b9c7 get the subject first if you go to the feed 2011-02-11 03:01:24 +00:00
Zach Copley
df19e88323 Atom output - Reinstate activity:actor and activity:subject
w/deprecation warnings. Also add statusnet:profile_info back into
author/actor.
2011-02-09 23:18:14 -08:00
Siebrand Mazeland
7db24c32d6 * fix some i18n and L10n issues
* update/add translator documentation
* remove superfluous whitespace
2011-01-29 00:33:13 +01:00
Evan Prodromou
2a59453d4c Merge branch 'testing' into moveaccount 2011-01-17 17:34:03 -05:00
Evan Prodromou
e433e559f8 let callers pass in an XMLOutputter to output to 2011-01-16 17:15:26 -05:00
Brion Vibber
f2a43769e7 Fix for atom/activity streams parsing: feed's <activity:subject> was being taken at a higher priority than entry's <atom:author>, which broke OStatus group posting since we retired <activity:actor>.
Added test case to ActivityParseTests.
2011-01-06 15:13:38 -08:00
Evan Prodromou
f5128015be Use outputTo() instead of asString() for including sub-elements 2010-12-27 09:46:25 -08:00
Evan Prodromou
1188d5bab2 Don't output deprecated <activity:actor> element 2010-12-27 09:25:26 -08:00
Evan Prodromou
24f9a991b6 Let activity objects write directly to activity's own outputter 2010-12-20 13:30:33 -05:00
Evan Prodromou
94ff04e190 Don't cache user-specific information for Notice atom entries 2010-12-08 13:59:12 -05:00
Evan Prodromou
1fb506c27d use codeKey() in activity caching 2010-12-06 17:28:22 -05:00
Evan Prodromou
8564fc51c5 cache generated activity info 2010-12-06 16:38:02 -05:00
Evan Prodromou
0c0418bdfb correctly generate enclosure in Activity::asString() 2010-12-06 15:51:42 -05:00
Evan Prodromou
1f0949f9ac remove common_debug() from Activity::asString() 2010-12-06 15:22:52 -05:00
Evan Prodromou
b28266b3d6 Convert Notice::asAtomEntry() to use Notice::asActivity() and Activity::asString()
We had two ways to generate an activity entry from a notice; one through
Notice::asAtomEntry() and one through Notice::asActivity() and
Activity::asString(). The code paths had already diverged somewhat. I
took the conditions that were in Notice::asAtomEntry() and made sure
they were replicated in the other two functions. Then, I rewrote
Notice::asAtomEntry() to use the other two functions instead.

This change passes the ActivityGenerationTests unit tests, but there
may be some other stuff that's not getting covered.
2010-12-05 16:15:05 -05:00
Siebrand Mazeland
b9177f5e2e * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-29 00:39:45 +02:00
Evan Prodromou
670ad53215 Merge branch '0.9.x' into activityexport 2010-09-15 23:31:20 -04:00
Evan Prodromou
0a5aa95746 flag to leave out author information in activity output 2010-09-15 07:11:50 -04:00
Evan Prodromou
a2fe29388d Activity::asString() should format numerical not string time 2010-09-13 17:05:02 -04:00
Siebrand Mazeland
8c94ebf537 * update/add translator documentation
* remove superfluous whitespace
2010-09-13 21:10:54 +02:00
Brion Vibber
2260d6ec7c Merge branch 'testing' into 0.9.x
Conflicts:
	index.php
2010-04-29 15:14:51 -07:00
Brion Vibber
8fd0059bf6 Test cases and fixes for Atom and RSS content decoding.
Fix extraction of Atom <content type="text"> and <content type="html">; we were failing to escape plaintext source data to HTML, and doing an extraneous double-deescape on HTML source resulting in breakage of notices containing text that looks like HTML. Only <content type="xhtml"> was working correctly previously.
Fixes for RSS2 content processing: we were failing to load <content:encoded> at all due to using wrong element name, and were applying an extraneous de-escape for <description> rather than the escaping that is required to turn plaintext into HTML. (Per spec, <description> must be plaintext.)
2010-04-23 15:40:48 -07:00
Siebrand Mazeland
9b788471d4 Add translator documentation. 2010-04-10 22:50:15 +02:00
Evan Prodromou
29566c5d4b move check for bad IDs from activityobject to activity and make simpler 2010-03-27 22:44:10 -04: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
Evan Prodromou
11a86d046e move atom category to its own file, too 2010-03-20 16:55:36 -05:00
Evan Prodromou
323ff31fbd special-case Posterous author element for activity actor 2010-03-20 16:53:30 -05:00
Evan Prodromou
99454be38c Move activity classes to their own files
Moved the various classes used by the Activity class to their own
files. There were >10 classes in the same file, with around 1500 lines
in the file. Just too big.

This change makes autoloading work for these classes, so also removed
the hard require in lib/common.php.
2010-03-20 16:06:22 -05:00
Evan Prodromou
2fc0f0433e allow html content in summary and clean it out of title 2010-03-20 09:30:28 -05:00
Evan Prodromou
65c8dc313c rename $rss to $channel to prevent misunderstanding
RSS feeds have the format
<rss><channel><item/><item/><item/></channel></rss>. The element named
$rss was actually the <channel> element, so I renamed the variable so
I wouldn't hurt my head.
2010-03-20 07:19:54 -05:00
Evan Prodromou
022c13418d make deriving a subject from an RSS channel work 2010-03-19 15:49:38 -05:00
Evan Prodromou
1292230e38 move ActivityObject constructors from Activity to ActivityObject 2010-03-19 15:41:48 -05:00
Evan Prodromou
13b1acdd08 only search elements for links 2010-03-19 15:28:25 -05:00
Evan Prodromou
05e3768e6a Parse RSS items as activities
First steps to parsing RSS items as activities. RSS feeds don't seem
to have enough data to make good remote profiles, but this may work
with some "hints".
2010-03-19 09:48:39 -05:00