Commit Graph

4030 Commits

Author SHA1 Message Date
Mikael Nordfeldth
d11ce2ef3b Consistently use "email-notify_fave" syntax for preference 2014-07-27 23:25:49 +02:00
Mikael Nordfeldth
2d0c7c2c99 ensureWebfinger was never complete in StatusNet. Worked a bit on it. 2014-07-27 23:08:02 +02:00
Mikael Nordfeldth
bb1ac66d74 Cronish plugin minor debugging text fixes and so 2014-07-21 09:51:28 +02:00
Mikael Nordfeldth
9a2e3a52c9 Don't access HTTP_USER_AGENT if it doesn't exist 2014-07-15 20:38:58 +02:00
Mikael Nordfeldth
ea8cb21e98 Allow exception to be thrown if saveActivityObject fails 2014-07-15 14:12:39 +02:00
Mikael Nordfeldth
c96f0aa30f More Activity-based reasoning for saveActivity in Notice
If we can, get the activity ID from the activity itself, instead of the
supplied $options array.
2014-07-14 23:54:58 +02:00
Mikael Nordfeldth
31d53ede91 Bad variable reference in Fave class 2014-07-14 23:37:28 +02:00
Mikael Nordfeldth
eb955fe629 "Notice posted" message in Ajax title for NewnoticeAction 2014-07-14 17:11:54 +02:00
Mikael Nordfeldth
b0c4a35940 Local favoriting fills out content to saveActivity 2014-07-14 14:05:47 +02:00
Mikael Nordfeldth
ae62b91940 Unifying HTML stripping functions to common_strip_html 2014-07-14 13:52:23 +02:00
Mikael Nordfeldth
ac44695c44 Put text content into Favorite activities/activityobjects 2014-07-14 13:25:26 +02:00
Mikael Nordfeldth
5ebe01ba36 NoticeStream fixes regarding non-post verbs 2014-07-14 00:59:04 +02:00
Mikael Nordfeldth
0a20abf1d8 Email notify-on-fave moved to Profile_prefs (run upgrade.php) 2014-07-13 19:46:40 +02:00
Mikael Nordfeldth
933bf0b026 Start and End EmailSaveForm events now take a scoped profile 2014-07-13 15:42:15 +02:00
Mikael Nordfeldth
c8873de08b Start and End EmailFormData events include current profile 2014-07-13 15:33:44 +02:00
Mikael Nordfeldth
a9bfa1979d Don't send favorite notifications unless the user wants it. 2014-07-13 12:58:52 +02:00
Mikael Nordfeldth
6f593a79d4 making more sense in mail_notify_fav
We should probably get rid of this function, at least storing everything in
lib/mail.php - but until then, at least let's make it more understandable.
2014-07-13 12:56:43 +02:00
Mikael Nordfeldth
0e8148af86 When modplus.css got moved, it should've re-related an image path 2014-07-07 01:40:33 +02:00
Mikael Nordfeldth
2eea7a2d4b Do proper Activity-plugin based mention notification 2014-07-07 01:15:43 +02:00
Mikael Nordfeldth
aadc7398dc ModPlus and some layouting issues regarding fixes 2014-07-06 01:37:31 +02:00
Mikael Nordfeldth
fffacaa27c FavorAction now uses Notice::saveActivity 2014-07-06 01:37:03 +02:00
Mikael Nordfeldth
aa33b7f21c Fave does not carry a type
it did in FreeSocial, where I copied my code from.
2014-07-05 16:28:09 +02:00
Mikael Nordfeldth
57a2d7a0e2 Bad ActivityObject generation of Fave 2014-07-05 00:15:22 +02:00
Mikael Nordfeldth
ffb9d7ad3f Rewriting code for notice representation
Getting rid of NoticeListItemAdapter, putting more into ActivityHandlerPlugin
and relying on plugins to handle rendering code of the content. This gives us
a lot more structure and consistency in notice structure and allows activity
plugins to stop rendering certain kinds of notices more easily.

There should also be a property for an ActivityHandlerPlugin class to avoid
rendering notices in the ordinary stream, so we don't have to overload stuff.
2014-07-04 14:14:49 +02:00
Mikael Nordfeldth
eda69cabaf Remove Ostatus_profile when releted Profile is deleted 2014-07-04 11:45:42 +02:00
Mikael Nordfeldth
4b40d6bb2a TagprofileAction fiddled with, now doesn't require OStatus override
But it still doesn't quite work properly, so a lot of work is necessary for this.
2014-07-03 14:02:21 +02:00
Mikael Nordfeldth
b63f6e949c Converted all ActivityObject::fromProfile to $profile->asActivityObject 2014-07-03 10:51:36 +02:00
Mikael Nordfeldth
c44146d6f8 Favorites are now being stored from activities 2014-07-02 18:38:19 +02:00
Mikael Nordfeldth
2e6a32c7be Most of the activityobject-saving for Favorite implemented 2014-07-02 11:38:55 +02:00
Mikael Nordfeldth
b66ec247db Caching fixes for Fave class 2014-07-02 11:38:51 +02:00
Mikael Nordfeldth
9f4bcbad8a checkAuthorship events, Ostatus_profile rewrite to handle it
Lost dependency of OStatus plugin for lib/microappplugin.php, whoo!

also noting which plugins should be upgraded to new saveActivity support.

Favorite plugin won't work with the new system just yet, it doesn't have
the necessary functions to extract activity objects, but that's coming
in the next (few) commits.
2014-07-02 11:38:45 +02:00
Mikael Nordfeldth
acb07ef52f Added saveActivity method to Notice class
saveActivity will accept an Activity which gets parsed and saved through
plugins. So when an ActivityHandlerPlugin (such as Favorite will be soon)
gets a feed to save, this will be the function called instead of saveNew.
2014-07-02 11:38:37 +02:00
Mikael Nordfeldth
687f8ab42c GET, HEAD, DELETE are strings not constants 2014-07-02 11:38:27 +02:00
Mikael Nordfeldth
38bea34562 Moved functions into ActivityHandlerPlugin from MicroAppPlugin
Dummy functions in Favorite plugin so far
2014-07-02 11:37:46 +02:00
Mikael Nordfeldth
d0da552722 SalmonAction and extensions simplified 2014-06-28 20:33:09 +02:00
Mikael Nordfeldth
138d26d488 Favorite "aside"-sections moved, also small fixes left from before
Action now has 'isAction' which compares the loaded Action with names
of classes in an array (added without the 'Action') to its own type.
2014-06-28 16:09:46 +02:00
Mikael Nordfeldth
7e597ea7cc More Favorite pluginification (favecount, cache, menus(favecount, cache, menus)) 2014-06-28 14:03:30 +02:00
Mikael Nordfeldth
c137ead909 Confusing documentation and tooltip texts in Bookmark 2014-06-28 13:02:52 +02:00
Mikael Nordfeldth
fcdd061b4f pluginified most of hasFave, getFaves and related calls
The code is now more event-driven when it comes to rendering notices
and their related HTML elements, since we can't have direct calls from
core to a plugin.

lib/activitymover.php has a function to move a Favorite activity which
will not happen now. The move must be pluginified and performed as an
event which plugins can catch on to.
2014-06-27 14:09:02 +02:00
Mikael Nordfeldth
c4037a7549 Moved Favorite EVENTS into plugin folder text file 2014-06-24 16:47:44 +02:00
Mikael Nordfeldth
db7cc7fa75 Favorite functionality put into plugin (not done yet)
Now we have to fix any code in the core which directly uses the Fave class
or any other favorite stuff, since it is pluginised and thus might not be
available on some installations.
2014-06-24 15:58:53 +02:00
Mikael Nordfeldth
c74dc15173 DiscoveryHints gets microformats2 parsing abilities 2014-06-24 01:27:03 +02:00
Mikael Nordfeldth
55418685c4 DiscoveryHints now properly returns hcard url 2014-06-23 20:51:37 +02:00
Mikael Nordfeldth
41a233f106 ModPlus available also for non-logged in users. 2014-06-23 20:30:00 +02:00
Mikael Nordfeldth
725af5edd0 Event listing boolean logic error 2014-06-23 20:22:15 +02:00
Mikael Nordfeldth
4f59abea9a don't show ModPlus for group profiles 2014-06-23 19:08:15 +02:00
Mikael Nordfeldth
abcbca5a94 Group listing in Directory plugin works again 2014-06-23 19:02:47 +02:00
Mikael Nordfeldth
faa12e63c0 No nickname in profile listing 2014-06-23 18:59:32 +02:00
Mikael Nordfeldth
af02f445e4 Event cache clearing bug 2014-06-23 14:23:44 +02:00
Mikael Nordfeldth
703443f152 Event upgraded to microformats2 2014-06-23 14:20:06 +02:00
Mikael Nordfeldth
658c6ab9a8 RSVP stricter typing 2014-06-23 14:16:34 +02:00
Marcel van der Boom
42104612bd Make sure the Attention::saveNew does not cause an exception so queue items get removed
It's less of a problem that one queue-item does not get handled, attention wise,
than that the queue keeps filling up. The typical error raised here is 'already exists'
so it's not even the case that the item won't get handled (it already has been).

The real problem is that the queue_item table accepts duplicates (content-wise) which it
should not.
2014-06-22 17:22:04 +02:00
Mikael Nordfeldth
414a95a784 Initial move towards microformats2
No validation has been attempted yet. Lots of changes left. This
is visibly not (very) different from the previous CSS layout. But
some simplifications have been made.

Might cause issues with local changes to themes and CSS. Also maybe
javascript which depends on certain legacy microformats elements.

The move to microformats2 is motivated by the announcement that all
microformats should be migrated to version 2, as of 2014-06-20 at:
http://microformats.org/2014/06/20/microformats-org-turns-9-upgrade-to-microformats2
2014-06-22 17:11:04 +02:00
Mikael Nordfeldth
e4f1c77d6b showAvatar functions deduplicated into Widget class 2014-06-21 23:25:50 +02:00
Mikael Nordfeldth
de53e74f40 Proper HTTP status codes for WebFinger search miss 2014-06-04 12:59:58 +02:00
Mikael Nordfeldth
6d0ac21185 Return 404 on resource-not-found for WebFinger 2014-06-04 12:46:06 +02:00
Mikael Nordfeldth
d350a20e1f Less verbose debugging (also don't log private keys)
Magicsig private keys were logged. That's probably not a good thing.
MagicEnvelope full XML entries no longer spam the log either.
2014-06-03 12:53:04 +02:00
Mikael Nordfeldth
aaef11077d Default of Magicsig keypair toString should be secure
Prevent crappy coders from leaking private keys.
2014-06-03 12:51:52 +02:00
Mikael Nordfeldth
c99d4eddb1 Moved Poll CSS into the plugin directory 2014-06-03 11:38:40 +02:00
Mikael Nordfeldth
9a19588ac9 Moved QnA CSS into the plugin directory 2014-06-03 11:36:32 +02:00
Mikael Nordfeldth
e6dcb0c40e Moved Event CSS into the plugin directory 2014-06-03 11:34:39 +02:00
Mikael Nordfeldth
a7531ca5c7 Moved Bookmark CSS into the plugin directory 2014-06-03 03:08:14 +02:00
Mikael Nordfeldth
0bc122ff58 Magicsig::generate is now static
This also fixes a problem with "initial salmon slap", which was a
problem for newly registered accounts which would have their first
salmon slap fail to distribute since there was a problem with Magicsig
keys. Apparently we have to re-read them with importKeys so the
Crypt_RSA objects publicKey and privateKey match later instances of them.

I think it may have been that generate() doesn't specify a signatureMode,
but I leave experimentation of that to the future.
2014-06-02 21:50:40 +02:00
Mikael Nordfeldth
537dff7987 Salmon posts can only be made for local users. More typing!
Since we of course don't have the remote party's private keys anyway.

I made some small fixes in Magicsig class too, removing unnecessary code.
2014-06-02 19:46:42 +02:00
Mikael Nordfeldth
2cd25039af Quick-return is more comprehensible than long if statements 2014-06-02 19:37:06 +02:00
Mikael Nordfeldth
f7479e3f57 Prepare for WebFinger magicsig data for remote profiles 2014-06-02 19:33:09 +02:00
Mikael Nordfeldth
78805d113a MagicEnvelope discoverKeyPair now returns string
getKeyPair fills in missing data so it's a complete Magicsig.
We may use insert() here in the future so the Magicsig is cached locally.
2014-06-02 18:31:48 +02:00
Mikael Nordfeldth
d44588f98b Only use a Profile in MagicEnvelope keypair retrieval
So we _know_ there is a profile for the submitter we're about to verify.
2014-06-02 16:12:26 +02:00
Mikael Nordfeldth
56194b3cd9 Magicsig importKeys finetuning and getHash() use 2014-06-02 16:11:15 +02:00
Mikael Nordfeldth
dc52a8ff43 Don't ensureProfile before we verify signature 2014-06-02 16:10:26 +02:00
Mikael Nordfeldth
00b2bddc7c Clarify it's not base64, but base64url, encoding in Magicsig 2014-06-02 14:51:15 +02:00
Mikael Nordfeldth
993ad00333 Improve debugging for Salmon slaps 2014-06-02 14:20:58 +02:00
Mikael Nordfeldth
d534ea7bd6 Try the whole Salmon action for AlreadyFulfilledException
If we have already fulfilled the action, we don't have to send an error back.
2014-06-02 13:57:30 +02:00
Mikael Nordfeldth
c1dc13bef0 Magicsig warning message would fail to get bits 2014-06-02 13:35:29 +02:00
Mikael Nordfeldth
db443e9374 File::processNew now static and always throws exception on failure 2014-06-02 02:11:23 +02:00
Mikael Nordfeldth
d6f52f5939 File::processNew can return -1 which was not true for empty()
Also, File->getEnclosure() now throws exception if not enough metadata.
2014-06-02 01:46:09 +02:00
Mikael Nordfeldth
d596513e39 Stronger typing for NoticeListItem and so 2014-06-02 00:20:27 +02:00
Mikael Nordfeldth
3ef8322b03 There could be unresolvable FeedSub entries 2014-06-01 16:07:08 +02:00
Mikael Nordfeldth
75711ae06a Magicsig is made a bit less cumbersome 2014-05-31 13:41:49 +02:00
Mikael Nordfeldth
411f3b86a4 Use locally cached Salmon keys for profiles
Please note that we're not yet actually caching them ourselves.
2014-05-31 12:51:51 +02:00
Mikael Nordfeldth
0c2134f9ad Last objectification of MagicEnvelope. Smarter SalmonAction 2014-05-31 12:00:46 +02:00
Mikael Nordfeldth
120e5c685a Template engine is a good idea, but not in that implementation 2014-05-31 00:37:58 +02:00
Mikael Nordfeldth
62e8081863 Maybe the least necessary plugin: PoweredByStatusNet 2014-05-31 00:04:02 +02:00
Mikael Nordfeldth
9e6599b9fb Salmon log message tidying up 2014-05-28 14:07:47 +02:00
Mikael Nordfeldth
03fc02c26f Bad variable names (fixes last commit) 2014-05-27 13:02:26 +02:00
Mikael Nordfeldth
41773d3f67 MagicEnvelope object orientation (no passing arrays)
MagicEnvelope now uses object properties instead of passing arrays
around everywhere.
2014-05-27 12:01:12 +02:00
Mikael Nordfeldth
14251d26ad Make MagicEnvelope self-reference
Also, a stricer typing for DOMDocument in fromDom parsing function.
2014-05-27 10:18:36 +02:00
Mikael Nordfeldth
54ae0ed3cc Removed MagicEnvelopeCompat, legacy from SN <0.9.7 2014-05-26 23:54:22 +02:00
Mikael Nordfeldth
7c7426b473 Minor changes in Salmon lib for Magicsig retrieval. 2014-05-26 20:06:45 +02:00
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