Commit Graph

401 Commits

Author SHA1 Message Date
Evan Prodromou
f580147058 Clear ;last version of stream if importing old stuff 2011-03-31 16:15:05 -04:00
Brion Vibber
2bd9532ebe Merge branch 'master' into 0.9.x 2011-02-28 10:18:18 -08:00
Brion Vibber
9ec395b07a Workaround for reply timeline since_id issue: save the notice.created value into reply.modified, so we can key off it as expected.
As a hack this removes the mysql_timestamp bit from the field settings on reply.modified so that our value actually gets saved. This *should* work ok as long as system timezone is set correctly, which we now set to UTC to match when connecting.
2011-02-25 13:22:13 -08:00
Brion Vibber
0291c6f7cd Merge branch 'unicode-tag' into 0.9.x 2011-02-25 10:17:03 -08:00
Zach Copley
17176ee445 Merge branch 'json-activities' into 0.9.x 2011-02-25 00:15:26 -08:00
Brion Vibber
295e2bde56 Unicodize a couple regexes for tags: fixes linking & detection of non-ASCII tags that match the current regexes.
(Checks for 'letter' and 'number' characters, underscore, dash, and period.)
2011-02-23 16:37:55 -08:00
Zach Copley
29ce5dd19a Reinstate profile_info in author/actor 2011-02-17 19:02:57 -08:00
Evan Prodromou
ccdd47bdb4 use fallback URIs for groups when filling in attention in Notice::asActivity() 2011-02-17 10:51:00 -05:00
Zach Copley
764a29e2ff Remove debugging statements I accidentally left in 2011-02-16 16:21:31 -08:00
Zach Copley
a1b436a8c6 First cut at some JSON Activity Streams output 2011-02-15 20:25:39 -08:00
Brion Vibber
4883069177 Fix group regexes that got missed in Nickname::DISPLAY_FMT update: fixes bug where group linking happened, but not actual delivery, when using _underscores_ in the !group_name 2011-02-07 12:18:41 -08:00
Evan Prodromou
5f365e75ca only blow public timeline cache if notice is in it 2011-02-03 13:58:56 -05: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
Brion Vibber
e35d46b415 Fix for ticket #3010: blocks are now applied against the original poster of repeats.
Previously, if someone you subscribe to repeats a notice by someone you've blocked, you got the message and had to just roll your eyes.
Now blocks are checked against both the current notice's posting profile, and the poster of the original if it's a repeat.
2011-01-24 14:16:15 -08:00
Evan Prodromou
6ab46c70f7 Delete file links when Notice is deleted 2010-12-28 13:44:18 -08:00
Evan Prodromou
320e73a321 If notice has been deleted before, don't store URI again 2010-12-27 22:58:13 -08:00
Evan Prodromou
c458bafaa1 pass through $idField and $createdField in Notice queries 2010-12-27 22:35:57 -08:00
Evan Prodromou
9a6ceb3303 Merge branch 'righttoleave' into 0.9.x 2010-12-22 11:22:51 -08:00
Brion Vibber
fb65d5901d Update sorting for conversation views: adds notice_conversation_created_id_idx index on notice, replacing more limited notice_conversation_idx 2010-12-17 16:08:37 -08:00
Brion Vibber
1b90ed564a Update sorting on api/statuses/retweets: adds notice_repeat_of_created_id_idx index to replace notice_repeatof_idx 2010-12-17 15:13:09 -08:00
Brion Vibber
04aa8bd70f work around borkage in statuses/repeats -- tries to check an offset var that's not there. use the limit var which is there instead 2010-12-17 15:05:45 -08:00
Brion Vibber
4cd3a0756b Update notice sorting for profile streams; extract more common code to Notice::addSinceId() and Notice::addMaxId() 2010-12-17 13:20:38 -08:00
Brion Vibber
9e8bbff8ac Notice::whereSinceId() and Notice::whereMaxId() encapsulate logic for building where clauses for since_id/max_id parameters. Can override the field names from 'id' and 'created'. 2010-12-17 13:03:18 -08:00
Brion Vibber
5de86f0ccc Initial switch of public timeline stream to use timestamps for internal sorting 2010-12-17 12:38:38 -08:00
Brion Vibber
7c84c35587 Notice::getAsTimestamp() static function to look up the timestamp for a given notice, even if it's been deleted. To be used for converting since_id/max_id processing to use timestamp sorting internally. 2010-12-17 12:09:02 -08:00
Evan Prodromou
39804809dd distribute flag for Notice::saveNew() 2010-12-16 16:17:38 -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
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
Brion Vibber
aa96c3c1d9 Fix for tickets #2917, #2262: user URL shortening options not being applied in non-web channels
common_shorten_links() can only access the web session's logged-in user, so never properly took user options into effect for posting via XMPP, API, mail, etc.

Adds an optional $user parameter on common_shorten_links(), and a $user->shortenLinks() as a clearer interface for that.
Tweaked some lower-level functions so $user gets passed down -- making the $notice_id param previously there for saving URLs at notice save time generalized a little.

Note also ticket #2919: there's a lot of duplicate code calling the shortening, checking the length, and reporting near-identical error messages. These should be consolidated to aid in code and translation maintenance.
2010-12-02 13:41:56 -08:00
Brion Vibber
197b56778a Add $config['attachments']['process_links'] to allow disabling processing of mentioned URL links for attachment info (oEmbed lookups) and dereferencing of redirects that we didn't have shortened ourselves.
This option may be useful for intranet sites that don't have direct access to the internet, as they may be unable to successfully fetch those resources.
2010-11-17 13:03:59 -08:00
Evan Prodromou
c1cee3b27f Merge branch 'atompub' into 0.9.x
Conflicts:
	actions/apistatusesshow.php
	actions/apitimelineuser.php
2010-11-15 11:57:19 -05:00
Siebrand Mazeland
6aeba0cb7c i18n/L10n updates. 2010-11-04 18:33:39 +01:00
Brion Vibber
4f63e3be7d Fix for ticket #2804: bad non-cache fallback code for dupe checks of prolific posters
The old code attempted to compare the value of the notice.created field against now() directly, which tends to explode in our current systems. now() comes up as the server/connection local timezone generally, while the created field is currently set as hardcoded UTC from the web servers. This would lead to breakage when we got a difference in seconds that's several hours off in either direction (depending on the local timezone). New code calculates a threshold by subtracting the number of seconds from the current UNIX timestamp and passing that in in correct format for a simple comparison. As a bonus, this should also be more efficient, as it should be able to follow the index on profile_id and created.
2010-11-03 17:25:29 -07:00
Evan Prodromou
e51ed96b89 add rel=self links to atom entries 2010-10-25 09:48:01 -04:00
Evan Prodromou
698818bd7e show rel=edit links in notices for authenticated users 2010-10-24 23:05:33 -04:00
Brion Vibber
d6b3d7fb1a Fix unescaped dollar signs in double-quoted strings due to localization updates (%1$s etc) 2010-10-04 14:24:04 -07:00
Brion Vibber
6e58a926e3 ForceGroup plugin: optionally force new users to join a particular group or set of groups on registration; and/or to force posts by members of particular groups to be posted into those groups even if not explicitly mentioned. The posting feature requires a couple quick hook additions in core. 2010-09-30 18:05:44 -07:00
Siebrand Mazeland
b03ece26eb * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:21:09 +02:00
Evan Prodromou
b5cfcba471 Merge branch '0.9.x' into activityexport
Conflicts:
	plugins/OStatus/OStatusPlugin.php
2010-09-22 10:45:34 -04:00
Evan Prodromou
556a2a8fd8 use Profile::getUri() to get a profile's URI 2010-09-21 06:21:47 -04:00
Brion Vibber
521daf5562 Ticket #2327: fixing block to remove the blocking user's subscription to the blockee if present; also cleaning up inbox delivery to apply the block checks more consistently, instead of just to group posts. 2010-09-20 16:00:25 -07:00
Evan Prodromou
9f4891568f bugs in function calls in Notice::asActivity 2010-09-13 16:27:02 -04:00
Evan Prodromou
d634f9cf17 Notice::asActivity 2010-09-13 11:44:20 -04:00
Brion Vibber
7407754c27 Merge branch 'master' into testing 2010-09-08 11:47:44 -07:00
Brion Vibber
0ef422593b Don't explode if we fail to load a listed attachment id in Notice::attachments() 2010-09-02 15:39:22 -07:00
Evan Prodromou
82b1d6daef Merge branch 'swat0' into 0.9.x 2010-09-02 16:58:55 -04:00
Evan Prodromou
a2de30b767 Notice::saveReplies() uses Profile::fromURI() to handle remote profiles too 2010-09-01 16:15:51 -04:00
Evan Prodromou
21bf50bad6 Merge branch 'noticetitle' into 0.9.x 2010-08-14 12:03:25 -07:00