Commit Graph

117 Commits

Author SHA1 Message Date
Evan Prodromou
ead192fa41 add a foreign_link table with prefs for the link
darcs-hash:20080827032423-84dde-90a4d5931c2292c9ec5febd0c90ed18f6ab93e90.gz
2008-08-26 23:24:23 -04:00
Evan Prodromou
79f4469db9 Invite -> Invitation
darcs-hash:20080827010515-84dde-f4dd776209a0aa4f6a7e9d6ac1de46d83ff54650.gz
2008-08-26 21:05:15 -04:00
Evan Prodromou
e248066b74 updates for invitations
Add the code to registration to handle invitation codes.

Some edge cases on invitations: is the user already subbed to this
person? Tell them. Is the person already on the system? Sub the user
to them, then, and tell the user.

Add some code to User to auto-sub invitees whenever the email address
changes. Call it from a new registration with an invite code, and also
from confirmaddress.

Some whitespace cleanup in the files touched.

darcs-hash:20080827001927-84dde-b50e5d921ca3f2fb894821730ff93cac09d2ba66.gz
2008-08-26 20:19:27 -04:00
Evan Prodromou
3d48ae94e6 added a created timestamp to invitations
darcs-hash:20080826023116-84dde-7d80c624b2dcfa637f58509c1d5ff7eca371512c.gz
2008-08-25 22:31:16 -04:00
Evan Prodromou
ba0dd0a4c3 data classes for invitations
darcs-hash:20080823191015-84dde-05263d6e9a2535c726b98aacc5f3269f66fe22bd.gz
2008-08-23 15:10:15 -04:00
Evan Prodromou
a64330b77c blow subscriptions cache when the user deletes a notice
darcs-hash:20080920175339-84dde-e46d0e7b86e0752e8331cdfba26257b3ff9e601c.gz
2008-09-20 13:53:39 -04:00
Evan Prodromou
d53a4123f3 can actually take all the data in the window
darcs-hash:20080920174700-84dde-a00751e0eafd9adc4580924bb41c11b0649b7fe5.gz
2008-09-20 13:47:00 -04:00
Evan Prodromou
1a81057985 fixup SQL code
darcs-hash:20080915073412-84dde-3c9cfb1d2d4933dbaff002b30fffb9e7d3d5e1d7.gz
2008-09-15 03:34:12 -04:00
Evan Prodromou
a6974a6f84 fix cache deletion code
darcs-hash:20080915073215-84dde-34bdd1a40ce310bca5bbb6f11ed4df79c7915cb2.gz
2008-09-15 03:32:15 -04:00
Evan Prodromou
7334add156 compress window-getting to one function
darcs-hash:20080915071835-84dde-173e6afde44c3348c3314c638e2a67dfb333c011.gz
2008-09-15 03:18:35 -04:00
Evan Prodromou
1806469ba2 $INSTALLDIR -> INSTALLDIR
darcs-hash:20080915070413-84dde-5e942675dec105b297889a58ea770fb4b337307d.gz
2008-09-15 03:04:13 -04:00
Evan Prodromou
f246b8f2d7 cache noticesWithFriends in memcached
noticesWithFriends is turning out to be one of our most expensive
queries. The join is costly, and this method is hit over and over and
over by desktop clients and other API users.

So, I've added a first pass at caching the results. I store a "window"
of notices -- equal to the first 3 pages of notices, plus one for
pagination -- in the memcached cache. If with-friends notices are
requests, I fetch the whole window out of the cache and grab the slice
requested. If the requested notices are outside the window, we just do
the query. If there's nothing in the cache, we request the window and
store it, then return a slice.

I had to add a NoticeWrapper class that works like DB_DataObject
(well, just the fetch() part...) but just holds an array of notices
instead of a DB cursor.

Finally, saving a new notice blows away the caches for subscribed users.

darcs-hash:20080915065616-84dde-1b1e814c2294498a10b763b779cbb62c3f96aa84.gz
2008-09-15 02:56:16 -04:00
Ori Avtalion
77a96747d7 Disallow 'tag' and 'tags' as usernames. Fixes ticket #584
darcs-hash:20080905114534-57fc3-feee793696ddf3d5bbb1ae7f326d9d88dc961e60.gz
2008-09-05 07:45:34 -04:00
Ori Avtalion
8f33885e41 Some Notice::saveNew cleanups.
* No need to check $source's value before inserting
* No need to update the notice if the $uri was known in advance

darcs-hash:20080902173804-57fc3-496ceaf8192694db43e62f7af1f57785a1a16a01.gz
2008-09-02 13:38:04 -04:00
Garret Buell
51caab6e5e Elide_Tags
Make "#sanfrancisco", "#SanFrancisco", "#san_francisco", "#San.Francisco", and "#SAN-FRANCISCO" all link to http://identi.ca/tag/sanfrancisco but preserve appearance

darcs-hash:20080901025932-e3c0d-c0a939eaf7e242d88cbcb0d651c9d53718c60a9d.gz
2008-08-31 22:59:32 -04:00
Garret Buell
cca78b26f7 Allow_multicase_tags
Make "#test", "#Test", and "#tEsT" all preserve appearance but link to the same tag

darcs-hash:20080901001241-e3c0d-b466f35f4f023c6c90a6d2817487c97be9a1bbca.gz
2008-08-31 20:12:41 -04:00
Evan Prodromou
ca1f639fd6 log transport when claiming a notice
darcs-hash:20080830054933-84dde-58cc7aa6947612cda9987d532d85d9dd81e32410.gz
2008-08-30 01:49:33 -04:00
Evan Prodromou
6b1f391306 $this->log to common_log in Queue_item
darcs-hash:20080828004503-84dde-c406172d750d0a5452d5cc62ecd7b27db381c575.gz
2008-08-27 20:45:03 -04:00
Evan Prodromou
35ed6f473c change queue_item to use a compound primary key
Breaking up to use multiple queue handlers means we need multiple
queue items for the same notice. So, change the queue_item table to
have a compound pkey, (notice_id,transport).

darcs-hash:20080827211239-84dde-db118799bfd43be62fb02380829c64813c9334f8.gz
2008-08-27 17:12:39 -04:00
Evan Prodromou
b9f0ea6f0e break up monolithic xmppdaemon into multiple queue handlers
Eventually, the poor xmppdaemon has become overloaded with extra
tasks. So, I've broken it up. Now, we have 5 background scripts, and
more coming:

* xmppdaemon.php - handles incoming XMPP messages only.
* xmppqueuehandler.php - sends notices from the queue out through XMPP.
* smsqueuehandler.php - sends notices from the queue out over SMS
* ombqueuehandler.php - sends notices from the queue out over OMB
* xmppconfirmhandler.php - sends confirmation requests out over XMPP.

This is in addition to maildaemon.php, which takes incoming messages.

None of these are "true" daemons -- they don't daemonize themselves
automatically. Use nohup or another tool to background them. monit can
also be useful to keep them running.

At some point, these might become fork()'ing daemons, able to handle
more than one notice at a time. For now, I'm just running multiple
instances, hoping they don't interfere.

darcs-hash:20080827205407-84dde-97884a12f5f4e54c93bc785bd280683d1ee7e749.gz
2008-08-27 16:54:07 -04:00
Evan Prodromou
b1ff7d7a2b fix error storing uris of remote notices
darcs-hash:20080826211108-84dde-b277bdb1476b9cec0c0d93fa8d565c4642ba16c8.gz
2008-08-26 17:11:08 -04:00
Evan Prodromou
08a3c5ac7f use better SQL date, fix security problem with OpenID logins
darcs-hash:20080825184104-84dde-5735c1791002a12c3417603dc85da31ea868f263.gz
2008-08-25 14:41:04 -04:00
Evan Prodromou
21e4fb864f change DataObject_Cast to use sql_now
darcs-hash:20080825183005-84dde-c1d24a057d9545cc6d1f0dc21c5af4ea7316d8e9.gz
2008-08-25 14:30:05 -04:00
Evan Prodromou
c2a2da6966 add database tables for foreign services
darcs-hash:20080819221214-84dde-15683b1e146b9e29064aa8ae04bc7daebfaf2e92.gz
2008-08-19 18:12:14 -04:00
Evan Prodromou
47d15bc662 first step towards adding favorites to the system
darcs-hash:20080813142637-84dde-9530d153eceb6bbedbb692755aa5c96d65d8e071.gz
2008-08-13 10:26:37 -04:00
zach
35d1714621 Twitter-compatible API: support for new in_reply_to_status_id in statuses/update
darcs-hash:20080815185317-ca946-11c3f9f7255180d5d6ea7b115b3e33b2abb7fe93.gz
2008-08-15 14:53:17 -04:00
Evan Prodromou
7554f2561c move user registration to a single static method
darcs-hash:20080814002038-84dde-8505d4e083056b770db128129a95be639d8e7f0a.gz
2008-08-13 20:20:38 -04:00
Evan Prodromou
2c3ed64027 LOG_ERROR -> LOG_ERR (again)
darcs-hash:20080807234227-84dde-a64619c71de020aa2284ca1a36ea2a71ff8b29a6.gz
2008-08-07 19:42:27 -04:00
Evan Prodromou
9676315b2e extend length of source for notices
darcs-hash:20080731152731-84dde-dc6bf652c38ae9a52950e65d7cb310f870a70640.gz
2008-07-31 11:27:31 -04:00
Evan Prodromou
c21ed78fa7 save the source
darcs-hash:20080730025052-84dde-9669e6a7df50bf5762bd3e175ed1471bff9d446c.gz
2008-07-29 22:50:52 -04:00
Evan Prodromou
d79dc8344b refactor notice-adding code to one static method on Notice
darcs-hash:20080730022856-84dde-f19e4ff5d5ae2603b63b8aebd8f878ec90b3ce22.gz
2008-07-29 22:28:56 -04:00
Mike Cochrane
49f30e23a3 Resolve conflicts
darcs-hash:20080722205315-533db-7ebf783855b8f1b302c52ec431b4025ef0983c82.gz
2008-07-22 16:53:15 -04:00
mikec
a4fa34cecb Resolve conflicts after pull from evan
darcs-hash:20080721135637-edabd-cca33bc0a0936423b9fd2ffdf9413236123d680e.gz
2008-07-21 09:56:37 -04:00
Mike Cochrane
b1ea12de56 Changse to ini file that I always forget to record
darcs-hash:20080721123243-533db-bf3664c2cb9d2cd37c633e13ab918994c57d01a0.gz
2008-07-21 08:32:43 -04:00
mikec
334c652e80 Publish MicroIDs for email and mpp on profile and notice pages.
darcs-hash:20080721120036-edabd-838335c0e23c80a657d353955b25b52a9a8624b2.gz
2008-07-21 08:00:36 -04:00
Mike Cochrane
12e610a223 Regenerate class file for language column
darcs-hash:20080720100253-533db-bc2605d57e265cfa4e38866b977c81302d4fb1c5.gz
2008-07-20 06:02:53 -04:00
Mike Cochrane
02325570a6 Update for langauge column
darcs-hash:20080720095651-533db-fc0ab9f07e9d354c3b73a1f90bdc3224209651f2.gz
2008-07-20 05:56:51 -04:00
matthew.gregg
6dd211530f Patch for PITS 00032, 00033, 00034
darcs-hash:20080719003417-982e4-7004f8a4dfb447f941457c30b0b2289eee5582e6.gz
2008-07-18 20:34:17 -04:00
Mike Cochrane
224a3ad82c Missing ini settings for notice_tag table
darcs-hash:20080720080801-533db-ac529a873885e7142e6e0450479bf59aafb6c058.gz
2008-07-20 04:08:01 -04:00
Mike Cochrane
5d84485001 First cut at hastags support.
darcs-hash:20080720055702-533db-193ed842b0d0a952bef71a3c5287213ada0ef15c.gz
2008-07-20 01:57:02 -04:00
Evan Prodromou
471e4056f4 add notice sources (currently unused)
darcs-hash:20080722164639-84dde-19c6300516443862da016120cf9eed40e5972b6d.gz
2008-07-22 12:46:39 -04:00
Evan Prodromou
42ac47915b don't get a count from query
darcs-hash:20080722163116-84dde-3b17b13022b3d97483e911a99ebd23cc4b8da784.gz
2008-07-22 12:31:16 -04:00
Evan Prodromou
9515303b14 notices and counts
darcs-hash:20080722162332-84dde-75801a271f50789377aa7a3467223286c372ec6c.gz
2008-07-22 12:23:32 -04:00
Evan Prodromou
97b1552c9a another whitespace SQL error
darcs-hash:20080722161752-84dde-aaf5762ef3d376f0e8f335ff8f7811e3162d33fb.gz
2008-07-22 12:17:52 -04:00
Evan Prodromou
2f73f8a5e2 whitespace in SQL
darcs-hash:20080722161712-84dde-58d69d8861ad6be471ab2403cd5d23942c27eac6.gz
2008-07-22 12:17:12 -04:00
Evan Prodromou
81e6d50c53 blow off DB_DataObject joins, write SQL from scratch
darcs-hash:20080722161549-84dde-fedeed101bdef172f4a7aabf2278f1a2277a6d88.gz
2008-07-22 12:15:49 -04:00
Evan Prodromou
64ed01f0af centralize and optimize with-friends query
darcs-hash:20080722160213-84dde-2e466b9cc4601a8cb7237770a7df17a2f9dcadb9.gz
2008-07-22 12:02:13 -04:00
Evan Prodromou
e1361cdf48 mark notices as local
darcs-hash:20080722141614-84dde-b80c6945fdb90a5f67acaba65a1e4c2b306b1f8e.gz
2008-07-22 10:16:14 -04:00
Evan Prodromou
98af7402c7 update keys for incomingemail
darcs-hash:20080721085641-84dde-9b29902977f78714188ba5fe8c37b4d603c3c63b.gz
2008-07-21 04:56:41 -04:00
Evan Prodromou
f538ab414b save changes to smsemail
darcs-hash:20080721044604-84dde-c3e920bd56992c4e6a77625767b4599bacc74434.gz
2008-07-21 00:46:04 -04:00