Mikael Nordfeldth
5ef10a14ef
Get group attentions too for outbound notices
2016-01-09 15:06:44 +01:00
Mikael Nordfeldth
c3c5a9974d
Do proper fromUri lookup on groups too
2016-01-09 14:36:47 +01:00
Mikael Nordfeldth
28cd5640c1
Save attentions to Reply table for backwards compatibility
...
local users only of course
2016-01-08 01:59:16 +01:00
Mikael Nordfeldth
6255e1dca3
saveAttentions, trying to move away from saveReply
2016-01-07 23:23:51 +01:00
Mikael Nordfeldth
3eebf2a353
Don't store the notice object for distrib queue handler, just id
2016-01-07 20:24:59 +01:00
Mikael Nordfeldth
94392ab00c
Index the verb column since we do COUNT(*) based on it
2016-01-07 11:39:46 +01:00
Mikael Nordfeldth
4352d1739d
Always generate notice URLs on the fly for local notices
...
Related to issue #118
2016-01-06 16:24:33 +01:00
Mikael Nordfeldth
7b2036a4b5
Note in the debug log if we render the HTML of a message
2016-01-06 15:37:30 +01:00
Mikael Nordfeldth
b596391fcd
Avoid having to check for notices without rendered copies in upgrade.php
...
Always call the Notice->getRendered() function to get a rendered copy.
We could perhaps put some sanitation there too in the future
2016-01-06 15:32:27 +01:00
Mikael Nordfeldth
0fd2ad649e
Conversation IDs (again) no longer based on Notice ID
2016-01-06 13:58:46 +01:00
Mikael Nordfeldth
1946197a1c
Merge request #10 by aroque but in a slightly different version
2016-01-06 00:48:03 +01:00
Mikael Nordfeldth
8ad6b8809a
Don't abort on too long notices in Notice::saveActivity
2016-01-05 17:31:09 +01:00
Mikael Nordfeldth
336f099241
Don't store object type for verbs (as they don't have it)
2016-01-02 16:05:20 +01:00
Mikael Nordfeldth
0dfafe2567
NewnoticeAction now uses Notice::saveActivity(...)
2016-01-01 20:18:54 +01:00
Mikael Nordfeldth
f4309ed715
whitespace switch for code layout
2016-01-01 18:43:37 +01:00
Mikael Nordfeldth
e02c10a589
common_render_content doesn't require a Profile now
2016-01-01 18:40:58 +01:00
Mikael Nordfeldth
ad4beb9091
->getID() instead of ->id
2016-01-01 18:21:54 +01:00
Mikael Nordfeldth
10973dcf69
Don't require a notice object to common_linkify_mentions
2016-01-01 18:20:42 +01:00
Mikael Nordfeldth
df19791a8f
Wups, $notice not $stored in the old function...
2015-12-31 02:37:42 +01:00
Mikael Nordfeldth
8b0fdfb4a0
Notice conversation is perhaps not set yet
2015-12-31 02:35:13 +01:00
Mikael Nordfeldth
7cf6aaecd0
Don't do saveKnownReplies unless it's a verb=post
2015-12-31 02:31:35 +01:00
Mikael Nordfeldth
66289d3e76
Use recently implemented functions in saveKnownReplies
2015-12-31 02:22:49 +01:00
Mikael Nordfeldth
998db39b1a
Notification mails are sent again fixes ssue #99
...
The problem was that the ActivityVerbPostPlugin handled 'post' verbs
but didn't handle the notifications for them, so now we're returning
true in the event so the default behaviour (sending to 'getReplies'
recipients) is done by default.
2015-12-30 17:35:47 +01:00
Mikael Nordfeldth
0ac71c2b7b
Duplicate URI means we have it already, I assume
2015-12-27 01:40:00 +01:00
Mikael Nordfeldth
376d545082
Remember to purify HTML...
2015-12-05 15:56:50 +01:00
Mikael Nordfeldth
d0e7203d88
Make it clearer that we're handling group IDs
2015-11-08 23:31:45 +01:00
abjectio
aa5bbdf6e5
Bug in catch(Exception) - parameter wrongly written
2015-10-16 23:48:05 +02:00
abjectio
626333a59e
geParent() method will fail if the parent notice does not exist in the notice table. See https://quitter.no/notice/709400
2015-10-14 18:50:39 +02:00
Mikael Nordfeldth
d260808cd3
intval for type assurance
2015-10-14 01:16:22 +02:00
Mikael Nordfeldth
79c40bc73b
Type-aware comparison is necessary for Notice is_local/scope
2015-10-14 00:42:15 +02:00
Mikael Nordfeldth
236bf0b0f5
Remote notice creators should not have notice is_local default to LOCAL_PUBLIC
2015-10-14 00:10:01 +02:00
Mikael Nordfeldth
5b307c0417
Add a url test in Notice::saveActivity
2015-10-13 23:39:40 +02:00
Mikael Nordfeldth
7834e67583
Just a functionifying of Notice->rendered
2015-10-12 17:16:13 +02:00
Mikael Nordfeldth
6376b78a80
I think I have made the delete verb generate proper AS
...
ActivityStreams had a different/better definition than me
in how to define the Delete verb data:
http://wiki.activitystrea.ms/w/page/23541872/Delete
2015-10-10 11:08:17 +02:00
Mikael Nordfeldth
2dfd34b12d
Post verb default type is 'note'
2015-10-09 16:18:12 +02:00
Mikael Nordfeldth
0bdbb32f3b
Consistent camelcasing
2015-10-09 15:45:05 +02:00
Mikael Nordfeldth
7c68537b06
Deletes now federated. But might not be handled properly
2015-10-03 14:39:49 +02:00
Mikael Nordfeldth
db9f68e651
Sigh, use the correct variable name...
2015-10-03 13:45:06 +02:00
Mikael Nordfeldth
66a1d63dd0
if is_local was not provided to Notice:saveActivity it wouldn't be set
2015-10-03 13:24:31 +02:00
Mikael Nordfeldth
dac617d95a
I think all the notice deletion calls are event-compatible now
...
This means we can handle DeleteNoticeAsProfile in plugins, such as
the ActivityModeration plugin.
2015-10-03 12:26:09 +02:00
Mikael Nordfeldth
88f7bb1ed5
Some work on ActivityModeration with notice deletion
...
Let's now create an event called DeleteNotice and also make sure we
handle the onNoticeDeleteRelated properly in ActivityModeration to
avoid possible endless loops etc.
2015-10-03 02:02:37 +02:00
Mikael Nordfeldth
3a6c98ff16
NoResultException is common if reply_to was not cleared on parent deletion
2015-09-30 22:55:06 +02:00
Mikael Nordfeldth
a09cf51b99
Move Ostatus_profile->processPost function into plugin
2015-09-29 15:19:13 +02:00
Mikael Nordfeldth
21a12a2f60
Some conversationRoot lookups failed with deleted notices
2015-09-28 22:36:04 +02:00
Mikael Nordfeldth
604ed1fd9a
Prepare for ActivityModerationPlugin
2015-09-10 15:55:37 +02:00
Mikael Nordfeldth
3c86542a40
Move notice location data to Notice_location
...
Will probably take a _long_ time to do scripts/upgrade.php but don't
worry, it can be aborted and resumed.
2015-09-04 22:25:11 +02:00
Mikael Nordfeldth
5b09a150bc
Increased debugging and fixing conversation stitching for saveActivity
2015-07-18 19:19:16 +02:00
Mikael Nordfeldth
cd23c78800
Less redundant code.
2015-07-15 19:21:21 +02:00
Mikael Nordfeldth
76396041e2
$notices and $notice is not the same, silly!
2015-07-10 23:30:59 +02:00
Mikael Nordfeldth
9fb3ea3ce6
static function definitions and minor simplifying
2015-07-09 22:16:14 +02:00
Mikael Nordfeldth
3c2a720b21
Found a remnant staticGet call
2015-06-06 17:39:25 +02:00
Mikael Nordfeldth
ebdd792b6f
getByPK (primary key) lookup for Managed_DataObject instances
2015-06-04 22:17:40 +02:00
Mikael Nordfeldth
fe6498e7c8
Send objects instead of integers to File_to_post::processNew
2015-06-04 17:36:11 +02:00
Mikael Nordfeldth
fd121f371a
case insensitive indexing for content and nick/fullnames (search)
...
This broke when changing the database to utf8mb4 instead of utf8,
since utf8_general_ci wasn't accepted and the engine fell back to
utf8mb4_bin. Now we're back in case insensitive search business!
2015-06-03 22:43:51 +02:00
Mikael Nordfeldth
7e388e697d
fallback to local URL if reply->getUrl() is missing
...
Remote Activity notices generally don't have a proper HTTP URL associated.
2015-06-02 13:55:13 +02:00
Mikael Nordfeldth
0726dcd06c
Start using NoParentNoticeException more widely
2015-06-02 13:50:52 +02:00
Mikael Nordfeldth
c84b21008e
Notice->getParent code reuse
...
...not entirely sure whether to allow getParent calls on Notice
objects which have not been created, but we'll leave that in for now...
2015-06-02 13:46:23 +02:00
Mikael Nordfeldth
2096c18e57
use array_key_exists instead of empty to test array key
2015-06-02 13:14:57 +02:00
Mikael Nordfeldth
5081477e95
enclosures in Atom were not included
2015-04-05 20:24:17 +02:00
Mikael Nordfeldth
2821be2bce
Notice properties set in bad order on activityobject saving
2015-03-12 22:17:08 +01:00
Mikael Nordfeldth
5a235ffbf9
Event fixes for activityhandlerplugin
2015-03-12 21:53:44 +01:00
Mikael Nordfeldth
20f8dd6565
Repeats shown in threaded noticelist now handled by plugin
2015-03-12 19:49:20 +01:00
Mikael Nordfeldth
6f0f8cd6c7
Initial work on making the Share verb handled in plugin
2015-03-12 12:27:49 +01:00
Mikael Nordfeldth
aa27c45230
Notice class got exception throwing getById
...
Less code, more happy.
2015-03-09 17:33:20 +01:00
Mikael Nordfeldth
ce91f1c0e6
Hide posts from users with private_stream in scoping streams
...
For example the public timeline would show notices from a user with
private_stream configured. (previously it would only hide _new_ notices
by this user as they would be the only ones with notice scoping set).
2015-02-24 22:59:58 +01:00
Mikael Nordfeldth
060dbe1b56
Removing whitespace and creating an early-return in inScope
2015-02-24 22:44:43 +01:00
Mikael Nordfeldth
2f86cd8602
utf8mb4 conversion on database with index adjusts
2015-02-12 18:18:55 +01:00
Chimo
56d431320d
Replace one instance of LOG_ERR with LOG_DEBUG
2015-02-09 18:08:46 -05:00
Mikael Nordfeldth
a5d27d9ce7
/main/all will give a network-wide public stream
...
Qvitter had implemented this as a "PublicAndExternal" stream, but
I figured we might as well put it into the GNU social core.
2015-01-28 20:25:39 +01:00
Mikael Nordfeldth
93377e1c24
Allow fallback to local URL on Notice->getUrl()
...
To avoid verbose exception handling in other parts of the code.
2015-01-23 12:39:08 +01:00
Mikael Nordfeldth
3119341aea
Prefer local URLs for all locally generated notices.
2015-01-23 12:37:27 +01:00
Mikael Nordfeldth
6b48db2539
Merge commit 'refs/merge-requests/27' of https://gitorious.org/social/mainline into merge-requests/27
2014-12-09 13:30:47 +01:00
Joshua Judson Rosen
06235a3aa3
Consistently root autostitched conversations at the oldest notice.
2014-12-08 22:39:36 -05:00
Mikael Nordfeldth
d671b7b289
debug output was referencing wrong variable
2014-12-01 19:19:16 +01:00
Mikael Nordfeldth
411ce0629c
If a Notice insert fails, don't continue processing it
2014-11-27 14:29:50 +01:00
Mikael Nordfeldth
e0d0a59706
Move Conversation creation out of insert() to allow URI setting
...
This means we import the URI string from remote instances to track their
conversations and are able to stitch together replies in a single thread.
We might have to try to avoid collisions so noone remotely can predict
conversation URIs which we generate on our server, causing a DoS kind of
problem.
2014-11-27 14:27:41 +01:00
Mikael Nordfeldth
bdb4a41696
Use remote conversation URI info to stitch convos together
...
If we know the URI sent from the remote party, and we don't know the
notice it is replying to, we might still be able to put it in the same
conversation thread!
2014-11-27 14:06:10 +01:00
Mikael Nordfeldth
7ea067a0dc
Notice_source checks in better code style
2014-11-05 19:44:22 +01:00
Hannes Mannerheim
a3b66da261
repeat-bug, could not repeat oversized notices
...
this code is copy-paste from statusnet, apparently we need it still
2014-10-20 16:20:12 +02:00
Mikael Nordfeldth
e61e11a973
Shares would lack a title in any Activity representation
2014-07-30 00:17:22 +02:00
Mikael Nordfeldth
6e481d35ed
Start/End NoticeAsActivity modifications
...
More 'scoped' profiles and typing to the functions.
Also, there's no need to send an object as a reference.
2014-07-28 09:40:07 +02:00
Mikael Nordfeldth
eb2f93ad2b
More use of Profile, less User
2014-07-28 09:34:46 +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
ae62b91940
Unifying HTML stripping functions to common_strip_html
2014-07-14 13:52:23 +02:00
Mikael Nordfeldth
e0a10f775f
Store activity content into Notice table in saveActivity
2014-07-14 13:29:03 +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
42e2232371
Use canonical object type in Notice title as ActivityObject
2014-07-09 13:36:57 +02:00
Mikael Nordfeldth
2eea7a2d4b
Do proper Activity-plugin based mention notification
2014-07-07 01:15:43 +02:00
Mikael Nordfeldth
fffacaa27c
FavorAction now uses Notice::saveActivity
2014-07-06 01:37:03 +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
53b794342c
Saved incoming activites for Favorite as wrong profile
...
also removed some debugging lines
Now we have to get rid of OStatus dependency in lib/activityhandlerplugin.php
2014-07-03 14:08:26 +02:00
Mikael Nordfeldth
1f97376813
Occasionally we'd get a false from Profile::getKV
...
Due to cache miss? Probably, but now we simply say that it's null in that case
so we get a proper exception from Notice::_setProfiles
2014-07-03 11:55:24 +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
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
96babc59f5
getIdentifiers, resolveUri, findLocalObject Activity algorithms
...
Also modified related classes to support this feature.
2014-07-02 11:38:20 +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
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
a900d04052
Non-dynamic fetching for multiple Notice properties
2014-06-05 00:29:43 +02:00
Mikael Nordfeldth
3d807c812d
$notice->getProfile will ALWAYS return a Profile
...
otherwise it throws an exception
2014-06-05 00:07:04 +02:00