Commit Graph

3941 Commits

Author SHA1 Message Date
Mikael Nordfeldth 49fa34e234 Make Profile::fromUri use UnknownUriException 2014-05-26 15:05:14 +02:00
Mikael Nordfeldth ba10da27da Should not normalize Salmon author URIs.
It's normalized in Discovery->lookup later anyway.
2014-05-26 14:20:42 +02:00
Mikael Nordfeldth 8c348c96e7 getAuthorUri is a more appropriate function name 2014-05-26 14:14:54 +02:00
Mikael Nordfeldth fac102a50a checkAuthor not used anywhere 2014-05-26 14:13:35 +02:00
Mikael Nordfeldth 3c322abafc There's no guarantee we have an Ostatus_profile for Feedsub 2014-05-19 18:34:44 +02:00
Mikael Nordfeldth 0dad11bb85 Inform and make use of NoProfileException in OStatus actions
This is because Ostatus_profile->localProfile() throws NoProfileException
instead of returning null for profiles which don't exist in Profile table.
2014-05-19 18:07:57 +02:00
Mikael Nordfeldth 63c20e59aa UsersalmonAction cleanup 2014-05-19 18:07:14 +02:00
Mikael Nordfeldth 228dc1f851 Ostatus_profile throws NoProfileException from localProfile()
Some implementations of the exception handling is included here,
the actions come in a later commit.
2014-05-19 17:59:36 +02:00
Mikael Nordfeldth d2c749c7de NoUriException added and implemented in FeedSub class
This is a specific exception for objects which require URI but lack it,
first implemented in FeedSub to allow for identification of bad entries.
2014-05-19 17:30:04 +02:00
Mikael Nordfeldth fc942f5a04 Removing unused functions from Bookmark plugin 2014-05-19 15:19:17 +02:00
Mikael Nordfeldth fb82c75b49 adminUpdates setting not available now
We don't run a service similar to update.status.net yet. Maybe we should,
but that's for the future to decide. Currently I view it as a callback
that we want to avoid.
2014-05-19 14:53:52 +02:00
Mikael Nordfeldth 1207f4f06f isLocal() for User_group 2014-05-19 14:46:54 +02:00
Mikael Nordfeldth f37fc4247a sprintf for SQL calls, please 2014-05-19 01:09:21 +02:00
Mikael Nordfeldth d7c40e77b2 Show more links work with AJAX-retrieved HTML
Attachment_ajaxAction has been removed since AttachmentAction handles
AJAX calls splendidly.
2014-05-19 00:56:21 +02:00
Mikael Nordfeldth c93a5252c1 Don't show or preview text/html attachments
htmLawed cleans stuff out properly, but there's no very good way right
now to show text/html attachments, since everything gets jumbled up with
our own CSS etc. Best would be an iframe or just a new tab or so.
2014-05-18 23:11:49 +02:00
Mikael Nordfeldth b0cc9292b1 Notice->repeat() function takes Profile as argument now 2014-05-18 21:03:10 +02:00
Mikael Nordfeldth c6ba545697 XrdAction extends ManagedAction 2014-05-17 15:14:34 +02:00
Mikael Nordfeldth cd3cff451f ConversationTree is now a plugin (not oldschool setting)
Conversation trees works pretty bad with the current layout, javascript
etc. So it's best if we separate it and work on it as a side-project. The
oldschool settings are currently being deprecated (or broken out like this).

I'll wait with removing User preferences for oldschool conversation tree,
since that might be reusable data. But I guess it will go in the near future.
2014-05-12 11:51:11 +02:00
Mikael Nordfeldth d59b39275b Not sure how much time to spend on GNUsocialPhotos plugin 2014-05-12 11:13:13 +02:00
Mikael Nordfeldth 04b7194511 Notice->getUrl() for shares would throw exception in some feeds 2014-05-10 13:06:18 +02:00
Mikael Nordfeldth 888ac77906 "Twitter card" support had badly referenced HTML outputter 2014-05-10 02:01:58 +02:00
Mikael Nordfeldth 7977361193 Too many bird wings ({), sorry Erkan :) 2014-05-07 09:52:50 +02:00
Mikael Nordfeldth b59beb50e6 misplaced dollar sign, also URLs != attention URIs 2014-05-07 09:20:57 +02:00
Mikael Nordfeldth 4520e8c517 Old examples of lacking 'new' before 'Exception' 2014-05-07 00:06:16 +02:00
Mikael Nordfeldth c01138c16b Forgot 'new' before the Exception class 2014-05-07 00:06:04 +02:00
Mikael Nordfeldth d1755e4363 Bad variable reference in OembedPlugin 2014-05-06 23:43:02 +02:00
Mikael Nordfeldth 1776c90cb9 Moved oEmbed stuff out to a plugin (Oembed). 2014-05-06 23:32:13 +02:00
Mikael Nordfeldth 074b2b621c Garbage collection script didn't loop through anything 2014-05-06 16:18:47 +02:00
Mikael Nordfeldth 8b12e41351 User object didn't have getNickname() function
We're just jumping on to the Profile->getNickname() function.
2014-05-06 16:08:36 +02:00
Mikael Nordfeldth 869ca2d20b Missed a $user->id to $profile->id translation 2014-05-06 15:43:06 +02:00
Mikael Nordfeldth c279a33feb More Exceptions for FeedSub doSubscribe and related functions
Now also garbageCollect will now throw exceptions of failures of all kinds
and only reply true/false on entirely successful runs of sub/unsub.
2014-05-06 15:40:57 +02:00
Mikael Nordfeldth 0fa00d5106 Type testing instead of just empty() in OStatusPlugin 2014-05-06 14:36:52 +02:00
Mikael Nordfeldth 1a0171ef61 MagicEnvelope class now throws exception on XRD fail 2014-05-06 13:11:29 +02:00
Mikael Nordfeldth fc3125cf28 More modern coding, stuff related to subscriptions
Also trying to use the newly implemented AlreadyFulfilledException
2014-05-05 23:58:05 +02:00
Mikael Nordfeldth 150a1abecb MSN probably doesn't work, and we don't like it anyway 2014-05-05 23:02:17 +02:00
Mikael Nordfeldth 805958cc23 UsersalmonAction updated to stronger typing standards 2014-05-05 19:38:01 +02:00
Mikael Nordfeldth 595d231d9a GroupsalmonAction updated to stronger typing standards 2014-05-05 19:25:39 +02:00
Mikael Nordfeldth cdefeda659 More debugging for Salmon activities 2014-05-05 19:10:44 +02:00
Mikael Nordfeldth bbada781b7 Stronger typing and function access control in OStatus 2014-05-05 19:06:22 +02:00
Mikael Nordfeldth 2ea5f00666 Success debugging was too much noise 2014-05-05 18:59:44 +02:00
Mikael Nordfeldth 960baae1d1 More debugging in Magicsig class verify method 2014-05-05 17:48:21 +02:00
Joshua Judson Rosen 7440dc2145 Prevent spurious refusals of legitimate notices posted to users via Salmon.
Make the logic match the intent described in the comments.

The intent is clearly "accept notices whenever (A or B or C)", but
the logic implemented was more like "not ((not A) or (not B) or (not C))",
which is a basical boolean algebra fail (each of those ORs need to
become ANDs for double-negation to work).

The practical implication was that, for example, writing a reply
to someone else's notice and including an @-reference to _another_
user on another site to bring them into the discussion would
fail to deliver the notice to the new user because their server
would basically say `oh no, you can't message this user
from someone else's thread' because an earlier check for
the `A' or `C' parts of `(A or B or C)' prevents `B' from
being checked.

cf.: <http://status.hackerposse.com/notice/55846>, which was
refused by the nhcrossing.com server because it didn't know
about <http://sn.jonkman.ca/notice/93724>, even though it would
have passed the later `notice contains a reference to a local user'
check if not for an exception being prematurely thrown.

The whole idea of reporting `which specific check FAILED'
in an `if ANY SUCCEEDS' analysis is just bogus, so nix all of
the distinct ClientExceptions--a single `ALL FAILED' exception
is the only one that makes sense.
2014-05-05 13:35:38 +02:00
Joshua Judson Rosen 4fd3f43ad2 Autocomplete: don't match non-subscribed group-names.
There's no point, since we can't post/link to them anyway.
2014-05-05 13:32:18 +02:00
Mikael Nordfeldth 27ed6b7db0 getConversationUrl introduced for linking to conversations 2014-05-01 15:25:19 +02:00
Mikael Nordfeldth caeb6e583c We're not interested in Disqus support. 2014-05-01 02:15:10 +02:00
Mikael Nordfeldth b77a09fdee Notice URIs are not necessarily URLs.
Let's use getUrl() for URL retrieval. May throw exceptions, but
only if it's a Notice that cannot be linked like that anyway.
2014-04-30 20:44:23 +02:00
Mikael Nordfeldth 1acffa9c7a wtf is Echo? bah, let's get rid of this crap 2014-04-30 20:35:06 +02:00
Mikael Nordfeldth 7d191f8062 s/bestUrl/getUrl/ for notices and microapp objects 2014-04-29 19:46:58 +02:00
Mikael Nordfeldth c1d2f2516a VideoThumbnails failure detection improved. 2014-04-29 19:45:42 +02:00
Mikael Nordfeldth c8d613b916 Minifying javascripts is evil. Let's not do it.
The microformats stuff was unused
2014-04-28 18:57:11 +02:00
Mikael Nordfeldth b0cae37b0f Datetime representation aligned for microformats2
Read more at http://microformats.org/

Also, tooltip text on time representation for humans has been improved.
Unfortunately no standardised representation (like "RFC850") had 4-digit years.
2014-04-28 18:54:55 +02:00
Mikael Nordfeldth 5fd6053220 Code cleanup and enabling User object's etc. getUri() 2014-04-28 14:08:42 +02:00
Mikael Nordfeldth 030639d02d EmailAuthentication enabled by default
The login field said "Username or email address" already, so...
2014-04-28 12:39:57 +02:00
Mikael Nordfeldth 37ce1f4766 Better fallback on UnsupportedMediaException 2014-04-28 12:12:06 +02:00
Mikael Nordfeldth d59eb5e184 Dynamically generate thumbnails (see full text)
The File object now stores width and height of files that can
supply this kind of information. Formats which we can not read
natively in PHP do not currently benefit from this. However an
event hook will be introduced later.

The CreateFileImageThumbnail event is renamed to:
CreateFileImageThumbnailSource to clarify that the hooks should not
generate their own thumbnails but only the source image. Also it now
accepts File objects, not MediaFile objects.

The thumbnail generation is documented in the source code. For
developers, call 'getThumbnail' on a File object and hope for the best.

Default thumbnail sizes have increased to be more appealing.
2014-04-21 20:46:11 +02:00
Mikael Nordfeldth 86ddf120d7 Better event name (creating thumbnail _source_) 2014-04-21 12:33:41 +02:00
Mikael Nordfeldth 639cf48cc7 OStatus onStartNoticeSourceLink to use exceptions 2014-04-19 22:18:36 +02:00
Mikael Nordfeldth 37e9366e88 We get profiles directly, there's no user object anymore 2014-04-18 22:18:11 +02:00
Mikael Nordfeldth 5ef6ee4bc5 Better plugin description for VideoThumbnails 2014-04-16 22:12:15 +02:00
Mikael Nordfeldth 06d4cecf7f MediaFile thumbnail event hooks + VideoThumbnails plugin
The exception thrown from MediaFile will be caught and simply result in
no thumbnail at all right now. In the future we might use a catch-all
and have a "cannot generate preview"-icon or something.

VideoThumbnails requires php5-ffmpeg and php5-gd.
2014-04-16 21:48:58 +02:00
Mikael Nordfeldth a2a2105058 HTML5 required attribute for some input forms 2014-04-06 11:27:41 +02:00
Mikael Nordfeldth 220b51d8be Merge commit 'refs/merge-requests/199' of git://gitorious.org/statusnet/mainline into statusnet-merge-requests/199 2014-03-31 13:09:11 +02:00
Mikael Nordfeldth cb3d863668 Updated and moved XMPP documentation into plugin. 2014-03-11 00:11:25 +01:00
Mikael Nordfeldth e9e4190b64 IrcManager does not have serverError, so it must throw ServerException 2014-03-10 00:30:41 +01:00
Mikael Nordfeldth c00491cd7a Cosmetic changes to common_redirect, clientError, serverError
Since these functions exit (or throw exception) after running, there
is no need to have a 'return' statement or similar afterwards.
2014-03-10 00:25:57 +01:00
Mikael Nordfeldth acbe94936f common_redirect and clientError exits, so refactor
One Event would never be called, and other stuff were redundant clauses.
2014-03-10 00:24:32 +01:00
Mikael Nordfeldth 8d655bc706 Add support for 'nohub' sub_state in FeedSub
(requires upgrade.php run)
2014-03-09 23:03:54 +01:00
Mikael Nordfeldth 779ce40ac3 Add functions to avoid direct variable access 2014-03-09 13:31:05 +01:00
Mikael Nordfeldth a1b0d5fa7e FeedSub gets a plugin event handler for sub/unsub 2014-03-09 13:27:28 +01:00
Mikael Nordfeldth 940867e39d RegisterThrottle didn't save the created time 2014-03-07 21:23:49 +01:00
Mikael Nordfeldth 326ad9376e Cosmetic changes to RegisterThrottle 2014-03-07 21:03:38 +01:00
Mikael Nordfeldth 4e8697c96e We don't add to inbox anymore. 2014-03-07 00:05:21 +01:00
Mikael Nordfeldth c4e1cd1289 Added OpportunisticQM README that has good docs 2014-03-06 14:45:18 +01:00
Mikael Nordfeldth aff6a66178 Add Attention stuff to TwitterBridge 2014-03-06 14:28:27 +01:00
Mikael Nordfeldth 3be0e44490 Stricter typing + user detection in Realtime 2014-03-06 13:23:08 +01:00
Mikael Nordfeldth 2272cc244d Removed Inbox from core (unused since 4b2a66ed29)
Added the following FIXME:
How should a Twitter user get their Inbox filled with foreign tweets?

Every imported Twitter user has a profile in the Profile table, so we
could setup a Subscription entry for each of those, meaning they get
collected in the InboxNoticeStream... But this would mean a lot of
unnecessary entries and listings that generally just point to the
locked down Twitter service.

Let's figure out a good relation so we can connect any profile to any
imported foreign notice, so it shows up in the "all" feed.
2014-03-06 04:46:29 +01:00
Mikael Nordfeldth 4b2a66ed29 New mechanism for "all" feed (InboxNoticeStream)
Also cleaned up and made typing stricter for the stream, so only
profiles can be submitted. This reasonably also means we can create
"inbox" or "all" streams for foreign profiles as well using the same
stream handler (but of course only for messages we already know about).

To avoid looking up posts for a long time in a large notice database,
the lookback period for the inbox is no longer than the profile creation
date. (this matches the behaviour of Inbox)

Inbox class can probably be removed now.
2014-03-06 04:18:54 +01:00
Mikael Nordfeldth c0f65f6ea7 Merge branch 'master' into FeedPoller 2014-03-06 01:15:19 +01:00
Mikael Nordfeldth e571e64e9e Make ostatussub conform to coding standards a bit 2014-03-05 13:44:45 +01:00
Mikael Nordfeldth dc0ae2785d SubMirror now works again against old PuSH
There was a problem with (specifically at least) PuSHpress for
Wordpress. A previous attempt to perform a DB transaction backfired
because the remote side could connect to the callback before our
commit had gone through.

I take full responsibility for introducing the bug in the first place :)
2014-03-03 00:01:13 +01:00
Mikael Nordfeldth 83f50d25c0 Cosmetic changes to SubMirror actions 2014-03-02 23:06:21 +01:00
Mikael Nordfeldth 6f427d7e43 Remove Twitter from SubMirror
Twitter removed Atom feeds in API v1.1, so there is no way to mirror
a feed without screen-scraping or registering a dev account with them.
2014-03-02 22:58:23 +01:00
Mikael Nordfeldth 8ef29b70d1 GNU social naming, not StatusNet 2014-03-02 22:53:48 +01:00
Mikael Nordfeldth 8b04bcb310 Prepare for >1024 RSA keys for Salmon signatures 2014-03-02 11:47:38 +01:00
Mikael Nordfeldth 5c505d8539 Conversation ID now gets set from initial notice.
This will work without much extra effort because there will always be
more notices (higher value) than conversations (so no collisions).

But please run upgrade.php to avoid having an autoincrement id on
conversation table.

Installations using code after 2014-03-01 will have identical
conversation IDs to the initial (conversation root) notice IDs. This
will not affect older installations, which will have very different
values.
2014-03-01 17:12:40 +01:00
Mikael Nordfeldth fc047bd6e6 Minor code cleanup with group related actions (thanks brw12)
Originated from brw12 who noticed an incorrect variable name used in
an error message in actions/apigroupjoin.php:109
2014-03-01 12:01:17 +01:00
Mikael Nordfeldth 9a03ec98e7 Don't forget to strip 'Plugin'. (_MrB_ rocks, MMN-o sucks.)
Paths are like "plugins/Realtime/...", not "plugins/RealtimePlugin/...".
2014-03-01 11:07:58 +01:00
Mikael Nordfeldth d6ca90bb21 Partly revert 97830b0701 (thanks _MrB_)
require_once lines were required since _plugins_ don't __autoload

Also, Realtime would load the wrong URL for css/js since $this->name()
returns get_class($this) instead of the calling class' __CLASS__.
2014-02-27 23:30:35 +01:00
Mikael Nordfeldth 1e37f374b3 Making us less dependant on javascript trust
Many of the microapps are pretty javascript dependant, but at least
we should allow users to get to the new notice field without allowing
javascript to run in the browser. :)
2014-02-24 02:05:31 +01:00
Mikael Nordfeldth 97830b0701 Preparing plugins for no-minify-in-core-policy
also making the file structure better with js and css folders for Realtime and LinkPreview
2014-02-24 01:01:34 +01:00
Mikael Nordfeldth 698a7adb83 mentions from OStatus lookup were missing a 'type' attribute in common_linkify_mention 2014-02-23 21:49:55 +01:00
Mikael Nordfeldth 834ecd0f80 Autocomplete now matches remote profiles as well. 2014-02-23 20:12:01 +01:00
Jean Baptiste Favre 711f938892 Fiw TwitterBridge after SSL enforcement (https://dev.twitter.com/discussions/24239) 2014-01-26 22:27:16 +01:00
Mikael Nordfeldth b81d7c425d better comment for PuSH <0.4 hack 2014-01-01 19:47:41 +01:00
Mikael Nordfeldth e51f41c069 better comment for PuSH <0.4 hack 2014-01-01 19:43:31 +01:00
Mikael Nordfeldth b09b968f96 Twitter search server has changed domain name (thanks mrvdb) 2013-12-04 13:43:04 +01:00
Mikael Nordfeldth 710eac403c Cronish jobs by the minute. These run very often!
Minutely will NOT necessarily run by the minute, because it depends on
site visitors. Busy sites will be able to do this, but sites where the
visitors (or search engine stuff or api calls) are more than a minute
apart, the interval will be much larger.
2013-11-20 23:26:41 +01:00
Mikael Nordfeldth 9400795a5f Cron split into Cronish and OpportunisticQM
/main/cron changed to /main/runqueue

The key-required functionality is not throughly tested yet.
2013-11-20 21:20:42 +01:00
Mikael Nordfeldth b6f5f58f1a Attention structure has changed recently 2013-11-19 13:38:38 +01:00
Mikael Nordfeldth 3dcce8d987 Don't miss integer 0 values from find() 2013-11-19 13:30:14 +01:00