Commit Graph

1041 Commits

Author SHA1 Message Date
Craig Andrews a0114f2006 Correctly handle the case when MIME/Type doesn't know what file extension a mime type maps to 2010-03-01 21:44:42 -05:00
Evan Prodromou f00e8bbf47 Merge branch 'testing' into 0.9.x 2010-02-27 17:07:57 -05:00
Evan Prodromou 04c4facba9 fix call of common_find_mentions() in Notice::saveReplies() 2010-02-27 16:30:38 -05:00
Evan Prodromou 4d9daf2149 Use notice for context when deciding who @nickname refers to
In a federated system, "@nickname" is insufficient to uniquely
identify a user. However, it's a very convenient idiom. We need to
guess from context who 'nickname' refers to.

Previously, we were using the sender's profile (or what we knew about
them) as the only context. So, we assumed that they'd be mentioning to
someone they followed, or someone who followed them, or someone on
their own server.

Now, we include the notice information for context. We check to see if
the notice is a reply to another notice, and if the author of the
original notice has the nickname 'nickname', then the mention is
probably for them. Alternately, if the original notice mentions someone
with nickname 'nickname', then this notice is probably referring to
_them_.

Doing this kind of context sleuthing means we have to render the
content very late in the notice-saving process.
2010-02-27 16:06:46 -05:00
Siebrand Mazeland b701f5648d uri -> URI in interface text 2010-02-27 18:51:49 +01:00
Evan Prodromou a5cfda8505 blow cache on known replies 2010-02-26 17:47:39 -05:00
Craig Andrews 410cd52434 bail out if the requested nickname is illegal 2010-02-26 15:51:25 -05:00
Brion Vibber 8dfc8f1635 Merge branch 'testing' into 0.9.x 2010-02-26 09:35:28 -08:00
Brion Vibber 3aee8e0448 Fix a few keys that got dropped from statusnet.ini by mistake 2010-02-25 21:46:53 -08:00
Zach Copley 7922edb5b6 Add lots of fun avatars to our Atom output 2010-02-25 16:06:49 -08:00
Zach Copley e61edb55d9 Rationalize group activity stuff 2010-02-25 13:34:43 -08:00
Brion Vibber fb8b8615b0 Merge branch 'testing' of gitorious.org:statusnet/mainline into testing 2010-02-25 11:27:21 -08:00
Brion Vibber 79c0d52daa OStatus: save categories from the Atom entry as hashtags. 2010-02-25 11:26:33 -08:00
Evan Prodromou 2f03b2cc45 method for getting a group's URI 2010-02-25 12:15:26 -05:00
Evan Prodromou d53b4b9b84 save mainpage element for groups 2010-02-25 12:05:22 -05:00
Evan Prodromou 8f42d37593 Add 'mainpage' to User_group
Add the mainpage attribute to user_group objects.
2010-02-25 09:24:29 -05:00
Evan Prodromou e6858d7203 modify group actions so they use Local_group to look up by nickname 2010-02-25 08:44:15 -05:00
Evan Prodromou ddc3671b6a recover user_openid tables, which got lost in generation 2010-02-24 23:32:20 -05:00
Evan Prodromou 68a10970f9 fixup exe bits 2010-02-24 23:30:14 -05:00
Evan Prodromou bd68154772 Make user_group able to handle remote groups
We add a local_group table to store data about local groups. It has
the unique key for nickname, so /group/<nickname> looks up here.

Updated DB data object classes and data files.
2010-02-24 23:28:41 -05:00
Brion Vibber 59be4b8cae Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-02-24 15:47:51 -08:00
Brion Vibber 2aaf8d4e30 Add class and (if present) id to DB_DataObject error exceptions; often they're VERRRRRY vague, and it helps to know what type of item is failing! 2010-02-24 01:09:12 +00:00
Zach Copley 89dc6dee01 Add PoCo namespace to optional ns output in Notice::asAtomEntry() 2010-02-22 17:56:43 -08:00
Zach Copley cbf6ebae01 Merge branch 'rationalize-activity' into testing
* rationalize-activity:
  Move ActivityObject and related stuff to core
  Add PoCo bits, avatar link, geo point, etc. to person activity obj output
2010-02-22 17:12:33 -08:00
Zach Copley 6a711c6cdc Move ActivityObject and related stuff to core 2010-02-22 17:10:50 -08:00
Brion Vibber d410df0406 OStatus group delivery initial implementation.
- added rel="ostatus:attention" links for group delivery
- added events for plugins to override group profile/permalink pages
- pulled Notice::saveGroups up to save-time so we can override;
  it's relatively cheap and gives us a clean list of target
  groups for distrib time even with customized delivery.
- fixed notice::getGroups to return group objects as expected
- added some doc on new parameters to Notice::saveNew
 - 'groups' list of group IDs to push to in place of parsing
- messages that come in via PuSH and contain local group targets
  are delivered to local group members
- messages that come in via PuSH and contain remote group targets
  are delivered to local members of the remote group

Todo:
- handle group posts that only come through Salmon
- handle conflicts in case something comes in both through Salmon and PuSH
- better source verification
- need a cleaner interface to look up groups by URI
- need a way to handle remote groups with conflicting names
2010-02-23 00:44:45 +00:00
Evan Prodromou b79d4ed6a1 add PoCo preferredUsername for nickname in Profile::asActivityNoun() 2010-02-22 07:43:12 -05:00
Evan Prodromou fae5a15a88 add strongly-suggested link to Profile::asActivityNoun() 2010-02-22 07:40:20 -05:00
Zach Copley 35be39e30e Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-22 01:23:24 -08:00
Zach Copley 47300a2ae9 Upgrade profile-based activity noun to have more complete set of
profile fields
2010-02-22 01:21:34 -08:00
Evan Prodromou 891e002883 don't calculate replies for remote notices 2010-02-21 23:56:48 -05:00
Evan Prodromou a745d38d6d slight rearrangement of getting profile URIs 2010-02-21 22:52:27 -05:00
Evan Prodromou ab3db8c899 Combine code that finds mentions into one place and add hook points
Combined the code that finds mentions of other profiles into one place.

common_find_mentions() finds mentions and calls hooks to allow
supplemental syntax for mentions (like OStatus).

common_linkify_mentions() links mentions.

common_linkify_mention() links a mention.

Notice::saveReplies() now uses common_find_mentions() instead of
trying to parse everything again.
2010-02-21 16:20:30 -05:00
Brion Vibber 85528ccb1f Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x 2010-02-21 11:12:56 -08:00
Evan Prodromou e9d22138ef permalink on a note represented by rel=alternate 2010-02-21 09:23:51 -05:00
Evan Prodromou 9498a16480 Notice::saveNew() accepts url and rendered options 2010-02-21 09:17:00 -05:00
Brion Vibber 9c2fe8492f OStatus: send favorite/unfavorite notifications to remote authors 2010-02-20 15:56:36 -08:00
Evan Prodromou 36d21fa716 Add events for favor and disfavor
Added events to core code for when someone favors or disfavors a
notice.
2010-02-20 12:03:32 -05:00
Evan Prodromou 52e8aa798a Refactor subs_* functions for remote use
The subs_* functions in subs.php have made a lot of assumptions
about users versus profiles. I've refactored the functions to
be methods of the Subscription class instead, and to use Profile
objects throughout.

Some of the checks for blocks or existing subscriptions depended
on users or profiles, so I've moved those methods around a bit.

I've left stubs for the subs_* functions until we get time to replace
them.
2010-02-19 08:16:45 -05:00
Evan Prodromou 3d665f82d1 add type='text/html' to alternate link in Notice Atom 2010-02-18 22:13:47 -05:00
Evan Prodromou c2ba764535 always distribute to inbox of author immediately 2010-02-18 07:11:20 -05:00
Brion Vibber 5a6cbb248f Merge branch 'testing' into 0.9.x 2010-02-17 10:14:08 -08:00
Zach Copley 198c046c89 - Set the root of a new local conversation to a new conversation.id
- Output conversation URIs from conversation.uri
2010-02-17 01:12:13 -08:00
Zach Copley ed46a38ecf - conversation.uri needs to be nullable
- factory method for creating new local conversations
2010-02-17 01:11:14 -08:00
Zach Copley a2f8c5da17 New Conversation DO to handle remote notices as conversation roots 2010-02-16 23:30:08 -08:00
Zach Copley 2cb243808c More sensical profile::getUri() 2010-02-16 20:13:39 -08:00
Zach Copley c892726c80 Take remote profiles into account when looking up canonical profile URIs 2010-02-16 16:22:58 -08:00
Zach Copley eea52c708b Add rel="avatar" to img links in <activity:actor> stanzas 2010-02-16 11:32:10 -08:00
Evan Prodromou 3d170bfa30 Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing 2010-02-16 12:46:02 -05:00
Evan Prodromou 71ecd68901 add a FIXME to Profile 2010-02-16 12:45:00 -05:00