Commit Graph

7322 Commits

Author SHA1 Message Date
Brian Simpson
5fb0d32393 Relation._byID_rel: Add ignore_missing option 2016-03-07 09:36:52 -08:00
Brian Simpson
f58f3c16a7 Vagrantfile: Update box url and checksum 2016-03-04 13:50:57 -08:00
Brian Simpson
e9d39490bb Add zendesk-modmail integration 2016-03-03 15:51:06 -08:00
Brian Simpson
c65a8e1897 Add email provider for sending emails. 2016-03-03 15:51:06 -08:00
Brian Simpson
dc36addb0d WrappedUser: set context_thing_fullname if admin.
We should avoid adding the entire `Thing` as an attribute
because of caching loops.
2016-03-03 15:51:06 -08:00
Brian Simpson
d2c3fb6832 Restrict threaded modmail to html rendering. 2016-03-03 15:51:06 -08:00
Brian Simpson
092758e6ba Send modmail events to event-collector. 2016-03-03 15:51:05 -08:00
Brian Simpson
d3384ce7a5 Message: Add get_muted_user_in_conversation(). 2016-03-03 15:36:45 -08:00
David King
77a5fd9e78 voting.py: log a little more on TypeError 2016-03-03 14:43:06 -08:00
David King
bdab877b2e Fix tuples_to_sstables for Cassandra 1.2
* The constructor for `SSTableSimpleUnsortedWriter` changed
* `sstableloader` changed its directory structure. Now we just don't manage it at all in `tuples_to_sstables` and make the caller do the work
2016-03-03 14:43:06 -08:00
David King
1d35d9e0bf Add support in tdb_cassandra for JSON types
tdb_cassandra requires you to tell it what columns are of what type. We support
a few of them, including `pickle`. This patch adds support for JSON types as
well, which will be much friendlier to multiple tools working with this data
2016-03-03 14:43:06 -08:00
David King
8e37aaf880 Let tdb_cassandra.Model._set_values pass in their own batch mutator 2016-03-03 14:43:06 -08:00
David King
e349f1317f Add snappy dependency for upcoming feature 2016-03-03 14:43:06 -08:00
David King
ef6bb0405b Add top-level <updated> element to Atom feeds
`<updated>` is a required element of `<feed>`
(https://tools.ietf.org/html/rfc4287#section-4.1.1). There's not really a
sensical timestamp for us to put in there because most listings are changed
pretty constantly, so I just put in the timestamp that the feed was last
rendered.
2016-03-03 14:43:06 -08:00
Brian Simpson
32c52ecc75 Only set up comment embed if there is a comment 2016-03-03 12:10:44 -08:00
Brian Simpson
99f27d99c8 Move QA sort to QACommentOrderer
This allows us to remove most of the QA specific sorting logic from the
main CommentBuilder.
2016-03-03 12:10:32 -08:00
Chad Birch
ff0d31eda1 TEMP: redirect /related/ to comments page
We can leave this in for a while until search engines and other clients
figure out that the "related" page is gone.
2016-03-03 11:54:28 -07:00
Chad Birch
7aa4c97430 Remove the "related" page for posts
This page works by just doing a search for the title of the post. The
results are almost always completely useless. It's also hit extremely
heavily by search engine bots and is probably costing us a significant
amount of money doing all of these searches.
2016-03-03 11:54:27 -07:00
Kevin O'Connor
d30cfba527 Display current username prominently on OAuth authorization page. 2016-03-02 15:09:03 -08:00
Daniel Ellis
532de4425c ip_events: Move ip_events to reddit. 2016-03-02 14:31:39 -08:00
Brian Simpson
4c9d5d4484 Make errorlog employee only rather than admin only 2016-03-02 12:13:52 -08:00
Tiffany Dohzen
2546387861 Fix "inbox" tab selection for unread and username mentions 2016-03-02 11:23:55 -08:00
Tiffany Dohzen
b342f4bc6e Remove reddit store from footer 2016-03-02 11:23:55 -08:00
Neil Williams
487699f637 setup: Add comment about why baseplate's in a try block 2016-03-02 10:54:55 -08:00
Neil Williams
77c2a2ae16 install-reddit: Print out the conclusion text for non-vagrant users
This required a little more hygiene with the working directory during
the install stuff so that we can find the done script at the end.
2016-03-02 10:54:54 -08:00
Neil Williams
ce015068db install-reddit: Don't build statics
This speeds up builds and is unnecessary to do because uncompressedJS is
on by default.
2016-03-02 10:54:54 -08:00
Neil Williams
23cbcd3bbf install-reddit: Don't sudo inside install-reddit, require it outside
Previously, install-reddit.sh ran install/reddit.sh with sudo. This
confused install.cfg when install-reddit.sh was itself run with sudo
because the inner sudo would cause $SUDO_USER to erroneously be root.
install-reddit.sh _should_ be run as sudo so that when it prints out
install.cfg the values are accurate, but should not run
install/reddit.sh with an additional sudo since that'll mess things up.
2016-03-02 10:54:54 -08:00
Neil Williams
25761e50fb install-reddit: Don't expect the config file to be executable 2016-03-02 10:54:54 -08:00
Daniel Ellis
4c38e3196b ip: Accept any falsy value for column start and finish. 2016-03-02 09:28:47 -08:00
Brian Simpson
f575290741 Move sorting from CommentBuilder to CommentOrderer 2016-03-01 15:54:30 -08:00
Daniel Ellis
676dc3ec5a tdb_cassandra: Only pop item if reversing query. 2016-03-01 15:42:26 -08:00
Brian Simpson
60eba33456 CommentBuilder: Move collapse handling to apply_collapses() 2016-03-01 12:08:52 -08:00
Brian Simpson
3712bb2f04 CommentBuilder: Move Wrapped handling into wrap_items() 2016-03-01 11:24:06 -08:00
Daniel Ellis
6aca2ae9ac tdb_cassandra: Fix bug when reversing with column_start. 2016-03-01 11:11:51 -08:00
Daniel Ellis
53cfa79913 ip: Support reversing results in IP models. 2016-03-01 11:11:44 -08:00
umbrae
7945ab154b API: Add is_employee, in_beta states to me.json 2016-03-01 09:54:19 -08:00
Brian Simpson
80d7745dd1 Update /jobs redirect 2016-02-29 16:31:14 -08:00
Brian Simpson
9cf691ceae CommentTree.rebuild: add missing constructor arg 2016-02-29 12:19:51 -08:00
Brian Simpson
ca800d4eb2 CommentBuilder: Separate handling of MoreRecursions
This isolates the work and logic to one place rather than spread out in the
main CommentBuilder function.
2016-02-29 12:19:45 -08:00
Chris Slowe
5dabab71cb LoID fixup: only create new on non-static render types 2016-02-26 10:09:13 -08:00
Chris Slowe
ea17655abf Add server-side loid generation and cookieing.
This doesn't remove the existing loid generation in JS, but will supercede it as the first request from the server will have the an loid cookie.

This also doesn't change the current cookie behavior, but rather localizes all of the loid generation code to a module so that we can eventually fix it up and not break behavior in the rest of the app.
2016-02-26 10:08:19 -08:00
Chris Slowe
05fa36f801 Add ipv4/24 & ipv4/16 (obfuscated), and hooks to events 2016-02-26 10:07:19 -08:00
Chris Slowe
0ddc88523f Events: track rank of each link in a listing in screenview_events
Example payload:

```json
[
  {
    "event_topic":"screenview_events",
    "event_type":"cs.screenview",
    "event_ts":1455145909943,
    "uuid":"b1507273-c04e-43ab-b339-fb91f72b72b5",
    "payload": {
      "user_id":52,
      "user_name":"KeyserSosa",
      "listing_name":"frontpage",
      "rank_by_link":{"t5_20":1,"t5_1z":2,"t5_1y":3,"t5_1x":4,"t5_1w":5,"t5_1v":6,"t5_1u":7,"t5_1t":8,"t5_1s":9,"t5_1r":10,"t5_1q":11,"t5_1p":12,"t5_1o":13,"t5_1n":14,"t5_1m":15,"t5_1l":16,"t5_1k":17,"t5_1j":18,"t5_1i":19,"t5_1h":20,"t5_1g":21,"t5_1f":22,"t5_1e":23,"t5_1d":24,"t5_1c":25},
      "language":"en",
      "dnt":false,
      "referrer_domain":"reddit.local",
      "referrer_url":"https://reddit.local/",
      "target_type":"listing",
      "target_sort":"new",
      "app_name":"reddit.com",
      "utc_offset":-8,
      "user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36",
      "domain":"reddit.local",
      "base_url":"/new/"
    }
  }
]
```
2016-02-26 10:05:09 -08:00
Chris Slowe
1af69e491b Anti-Evil: move nofollow logic into a separate classmethod with a hook 2016-02-26 10:01:25 -08:00
Brian Simpson
cb72d46be7 CommentBuilder: Add a method to modify the comment tree
This is instead of bundling the modifications in with the logic
to determine the initial candidate comments.
2016-02-25 15:03:46 -08:00
Brian Simpson
f8e76c5226 CommentBuilder: don't shuffle the top level MoreChildren 2016-02-25 14:03:48 -08:00
Brian Simpson
c867b98619 CommentBuilder: Add comment about MoreChildren depth bug 2016-02-25 14:03:48 -08:00
Brian Simpson
e6ccea00a2 CommentBuilder: Add some comments in the constructor
The CommentBuilder has 3 different modes:
* regular mode for building a comments page
* permalink mode for building the tree starting from a specific comment
* morechildren mode for building the tree starting from specific comments
2016-02-25 14:03:48 -08:00
Brian Simpson
6fe0169198 Move make_wrapper to things.py 2016-02-25 14:03:48 -08:00
Brian Simpson
e272a9fe15 Delete unnecessary link_comments_and_sort 2016-02-25 14:03:48 -08:00