* qna:
Some work towards allowing revisions
Make new answers work
More plumbing
Work on QnA notice display -- in progress
* Move stuff around again * Make answers save
* Fix plugin filename * Make questions save!
Renamed QuestionAndAnswerPlugin to QnAPlugin
Most objects and forms are in place, now I just have to make it work.
Skeleton / Stub for Question and Answers micro-app plugin
Brion Vibber [Wed, 30 Mar 2011 19:50:56 +0000 (12:50 -0700)]
Fix timestamps in fallback content for EventPlugin
A bunch of the common_* functions for date formatting expect an interpretable string, rather than a Unix timestamp, as input. Switched to using the DB-formatted timestamps as we put them into the object rather than the unix timestamp intermediate value when formatting the plaintext and HTML fallback content.
Brion Vibber [Wed, 30 Mar 2011 19:36:54 +0000 (12:36 -0700)]
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.
Brion Vibber [Tue, 29 Mar 2011 23:58:15 +0000 (16:58 -0700)]
Consolidate common code in micro-apps custom notice type display actions.
The ShowNoticeAction subclasses were cut-n-pasting a lot of prepare() code from ShowNoticeAction, though the only part that's different is how we look up the notice. Broke that out to a getNotice() method, so only that needs to be copied. Avoids extra copies of permission checks and other common code in this spot.
Brion Vibber [Tue, 29 Mar 2011 23:20:12 +0000 (16:20 -0700)]
Consolidate some precondition checks for repeats, fix a couple bits in the repeat command.
Notice::saveNew() now does these checks directly when making a repeat:
* make sure the original is valid and existing
* stop you from repeating your own message
* stop you from repeating something you've previously repeated
* prevent repeats of any non-public messages
* explicit inScope() check to make sure you can read the original too (just in case there's a funky extension at play that changes scoping rules)
These error conditions throw exceptions, which the caller either uses as an error message or passes on up the stack, without having to duplicate the checks in each i/o channel.
@evan Fixed message domain for messages in plugins for recent commits.
Numbered parameters when more than one used in a message.
L10n updates for consistency.
i18n for non-translatable exception.
Updated translator documentation.
Removed superfluous whitespace.
Evan Prodromou [Tue, 29 Mar 2011 15:53:26 +0000 (11:53 -0400)]
Disallow repeats (retweets) of private notices
We disallow repeating a notice (or whatever) if the scope of the
notice is too private. So, only notices that are public scope
(available to everyone in the world) or site scope (available to
everyone on the site) can be repeated.
Enforce this rule at a low level in Notice.php, and in the API,
commands, and Web UI. Repeat button doesn't appear on tightly-scoped
notices in the Web UI.
Brion Vibber [Mon, 28 Mar 2011 22:13:59 +0000 (15:13 -0700)]
Work in progress: subscription approval policy field in place on user, hooked up to settings. Queue not 100% tidied up, no UI for queue or management yet.
Evan Prodromou [Fri, 25 Mar 2011 20:15:55 +0000 (16:15 -0400)]
Make function signature for getNoticeIds agree
There were some differences between defaults for the
NoticeStream::getNoticeIds() function and some of its subclasses'
implementations. So, I got them rationalized.
Brion Vibber [Fri, 25 Mar 2011 01:41:25 +0000 (18:41 -0700)]
TwitterBridge: discard outgoing queue items instead of retrying when Twitter API returns HTTP 400 or 404 error codes
We get HTTP 400 for various cases of invalid data, where retrying doesn't help at all -- previously those would loop forever, or until something died at least. :)
400 is also used for rate limiting, but retrying *immediately* will just hit the rate limit again, so better to discard if we're going over for now.