Commit graph

285 commits

Author SHA1 Message Date
Jonne Haß
9c67cd7eb9 collapse Post#last_three_comments and Commentable#last_three_comments, do not double query comments in CommentsController#index for a JSON response, remove spec that tests ordering as it's not deterministic on psql without specified order 2012-01-25 12:44:50 +01:00
danielgrippi
72aee6b2c1 don't use .last(3), use .limit(3) instead. also, don't put an order on an association as it isn't overridable. (this commit minimizes AR object instantiation in the stream) 2012-01-24 23:47:45 -08:00
Maxwell Salzberg
254860bddc SM MS; Read email sent to diaspora-dev for more information about this
commit. Add migration and rake task to copy hidden information from
share_visibilities to users. see: http://devblog.joindiaspora.com/?p=44
2012-01-17 19:29:01 -08:00
danielgrippi
91e3f5f6ff remove cache counter for photos, as it was causing too many edge-case errors & added complexity across models 2012-01-14 15:40:43 -08:00
Jonne Haß
0cc0b152d7 do not call .photo_count on a reshare etc. 2012-01-13 22:09:22 +01:00
danielgrippi
e928cc805a fixed markdown issues with reshares; removed puts from specs 2012-01-07 17:33:16 -08:00
Dennis Collinson
daba42c857 mentions now render client side, wow 2012-01-07 14:24:28 -08:00
Dennis Collinson
b13e72bc00 spec fix for markdown 2012-01-07 14:24:28 -08:00
danielgrippi
0fb1bf5d4b hash tags are linked on the front end, adding markdown.js file 2012-01-07 14:24:27 -08:00
danielgrippi
dbfb18e249 display reshare counts; test inf scroll & reshare counter in jasmine instead of cucumber 2012-01-07 14:23:27 -08:00
danielgrippi
64a90a30ef only load photos for a post if photos_count > 0; display 'limited' or 'public' in stream elements; fix small like bug in stream 2012-01-07 14:23:27 -08:00
danielgrippi
841cc29d25 add api block to photo; photos display in stream 2012-01-07 14:23:23 -08:00
danielgrippi
cd1d25dc30 remove widget references on backbone stream pages; don't call time_for_stream if @backbone (the method references @stream.stream_posts) 2012-01-07 14:23:22 -08:00
danielgrippi
cec2d27204 ported likes logic for the stream over from old branch 2012-01-07 14:23:22 -08:00
danielgrippi
414fb8d454 corrected template views; status message now includes oembed; updated post.rb api to supply oembed and object_url 2012-01-07 14:23:21 -08:00
danielgrippi
34e3403e2e jasmine green again; template switching in place, defaulting to displaying post text 2012-01-07 14:23:21 -08:00
danielgrippi
52e3f1b240 DC DG; test stream view WIP 2012-01-07 14:23:21 -08:00
Daniel Grippi
dca3581ae2 added likes to the stream element underscore partial 2012-01-07 14:23:20 -08:00
Daniel Grippi
d504bf4591 add current user to body tag data field (hackity hack). add comment links to posts 2012-01-07 14:23:20 -08:00
Daniel Grippi
176963fdad serialize current user json into body tag for now 2012-01-07 14:23:20 -08:00
Daniel Grippi
19db5519c0 DG DH; made acts_as_api play nice with backbonejs. comments are semi-functional; stream elements use the StreamElement js widget (for now). 2012-01-07 14:23:20 -08:00
danielgrippi
91ba6447d0 add acts_as_api to the models directly for now. the 'root node' problem (posts : {}) breaks backbone. wip 2012-01-07 14:23:20 -08:00
Pistos
f83e56e5f3 Added a counter cache for the number of reshares of a post. 2011-12-19 17:12:17 -05:00
Pistos
a604dd2aa6 Refactor implementation of #reshare_count.
The old implementation which uses Post.where causes

  undefined method `abstract_class?' for Object:Class

in spec/controllers/posts_controller_spec.rb.  Not sure whether that's a problem
with Rails, or rspec, or what.
2011-12-19 17:12:17 -05:00
danielgrippi
ae7944418c DH DG; made privacy page; can now unblock a user; users are actually being blockocked in ajaxed streams 2011-11-03 12:31:24 -07:00
Dan Hansen & Maxwell Salzberg
0eb33b371b blocked users works for multi stream, cuke passes
fixed scoping stuff
2011-11-03 12:31:24 -07:00
Dan Hansen
16e76886d9 wip 2011-11-03 12:31:24 -07:00
danielgrippi
c49c76e2a6 DG MS; some refactoring 2011-10-19 15:47:22 -07:00
Manuel Schölling
bdeae54c6c Make Photos not inherit from Posts 2011-10-16 13:58:35 +02:00
Manuel Schölling
02a3c3f88b Introduced Shareable 2011-10-16 13:58:35 +02:00
Manuel Schölling
6e325f8fd5 Introduced Commentable 2011-10-16 13:58:35 +02:00
Maxwell Salzberg
f959ca0c12 refactor streams to be in a Stream module, hopefully they will auto-reload now 2011-10-13 22:26:15 -07:00
Daniel Grippi
b7f4f81d28 Merge pull request #2148 from Pistos/issue-2007-comment-order-on-postgresql
Explicitly specify order of comments, since we cannot assume MySQL orderi
2011-10-12 16:09:18 -07:00
Maxwell Salzberg
9fd1d7db63 updating gemfile and schema.rb 2011-10-11 16:53:37 -07:00
Maxwell Salzberg
cfb28db00f wip, but the refactored code works 2011-10-11 16:12:32 -07:00
Maxwell Salzberg
139ddd726a wip oembed refactor. still need to make a oembed_helper, and move some tests to their new home, but e but we are looking preeeetttttyyyy good. 2011-10-11 16:10:14 -07:00
Manuel Schölling
f3ea8f424f Added oEmbed support 2011-10-11 16:08:47 -07:00
Pistos
15b3cce6ee Refactored ordering of post comments; moved it down to model level for greater reach (DRYer code).
Leaving the #order call in #last_three_comments caused the generated SQL to
have two conflicting ORDER BY components, which caused the query to return
invalid results.  I removed the problem by removing #last_three_comments which
I consider a premature optimization.
2011-10-11 16:06:24 -04:00
Pistos
4774b670de Whitespace cleanup. 2011-10-11 15:50:40 -04:00
Your Name
55ffc44a42 wip 2011-10-06 17:13:04 -07:00
Ilya Zhitomirskiy
d891e78652 refactored post receiving; only update cache on verfied received objects 2011-10-06 12:31:09 -07:00
Ilya Zhitomirskiy
c2bb483b21 dg iz updating authors cache on creation of a post 2011-10-04 17:40:44 -07:00
Ilya Zhitomirskiy
6ea540fb94 wip, adding to cache in receiver, caching is only triggered for receiving of posts 2011-10-04 10:32:17 -07:00
Maxwell Salzberg
8fa02584c0 fix a bug I introduced 2011-10-03 15:23:11 -07:00
Maxwell Salzberg
52bb5900a3 added shared behaviors for real 2011-10-03 15:23:10 -07:00
Maxwell Salzberg
9a4c478a7b these spes are really green. too bad we need #moar 2011-10-03 15:23:10 -07:00
Maxwell Salzberg
ad9dcd8542 holy guacamole. mentions page and tag following pages, plus a huge stream refactor 2011-10-03 15:23:10 -07:00
Maxwell Salzberg
429ac42502 added tag follow feature, mention page feature. is now pretty easy to add new types of streams, but some more refactoring could make it even nicer 2011-10-03 15:22:14 -07:00
Ilya Zhitomirskiy
27dcdf9a11 added an index to root_id 2011-09-30 11:35:07 -07:00
danielgrippi
e3bf03636b pass in mobile as provider_display_name on posts if posting from mobile 2011-09-28 22:15:32 -07:00
danielgrippi
91e649977c MS DG update copyright 2011-09-14 11:23:12 -07:00
Maxwell Salzberg
6b0507949c updated salmon to let us not always encrypt the header 2011-09-12 14:05:31 -07:00
danielgrippi
293afd80ff all_public scope in Post for clarity 2011-09-11 19:28:52 -07:00
danielgrippi
1d0bec11f7 Add counter cache for comments on posts 2011-09-11 15:02:24 -07:00
buddhamagnet
010024c4f9 continuing refactor of model validation calls to rails 3 syntax 2011-09-11 21:39:02 +01:00
Maxwell Salzberg
26151263c5 put receiving in a transaction, to prevent the crazy duplicate index errors and hopefully fix federation visibility. 2011-09-03 16:04:53 -07:00
Raphael Sofaer
8b743e7e3b Fix stack level too deep error on reshares 2011-08-12 13:20:25 -07:00
Raphael Sofaer
a2043671ce Move comment email subject line code into models 2011-08-11 10:46:15 -07:00
danielgrippi
aa3d626ada validate instead of throwing a db error 2011-08-10 10:38:28 -07:00
Raphael Sofaer
78bced56bb Reshares and reshare retractions are green. 2011-07-22 16:00:19 -07:00
danielgrippi
7b3180e5da user can retract a reshared post 2011-07-21 18:22:17 -07:00
danielgrippi
f3a515eef1 DG IZ reshare retractions is WIP 2011-07-21 18:22:17 -07:00
danielgrippi
67882c775e Addded Diaspora::Likeable module. Corrected the unique index for likes to include author_id; extracted before_save callback needed for tags into Diaspora::Taggable. 2011-07-11 15:06:35 -07:00
danielgrippi
d364f158b8 cache counters in for likes. pending Diaspora::Likeable module... 2011-07-11 15:05:55 -07:00
danielgrippi
2e15b6a61e Likes in comments, cache counter disabled for now. 2011-07-11 15:00:48 -07:00
Raphael Sofaer
39ff51a9d7 Make comments index ajaxy 2011-07-11 14:03:59 -07:00
Raphael Sofaer
1af945de11 Merge branch 'master' into oauth
Conflicts:
	Gemfile
	Gemfile.lock
	app/models/app_config.rb
	app/models/post.rb
	db/schema.rb
	public/stylesheets/sass/application.sass
	spec/lib/webfinger_spec.rb
2011-06-28 17:13:38 -07:00
danielgrippi
890dc7efd5 put some dependent destroys on models for better sqlite compatability 2011-06-19 23:39:57 +02:00
Raphael Sofaer
7171aa05ed Do a little bit more documenting. 2011-06-13 16:31:40 -07:00
Raphael Sofaer
4815482354 Start some real docs 2011-06-13 16:12:32 -07:00
Raphael Sofaer
381b85189d Add Chubbies, the oauth sample app, and a cucumber feature for part of an oauth flow 2011-06-03 16:22:38 -07:00
Raphael Sofaer
cc84051541 Fall back to author if the diaspora_handle isn't set, that column just needs to be removed 2011-05-23 14:54:27 -07:00
danielgrippi
6c31867345 check for AS object in partial hack 2011-05-19 12:40:05 -07:00
danielgrippi
648a10e6d3 Merge branch 'master' into follow
Conflicts:
	app/controllers/requests_controller.rb
	app/controllers/tags_controller.rb
	app/helpers/aspects_helper.rb
	app/views/notifications/index.html.haml
	config/routes.rb
	public/javascripts/aspect-edit.js
	public/javascripts/contact-list.js
	spec/integration/receiving_spec.rb
	spec/models/user/connecting_spec.rb
	spec/models/user/posting_spec.rb
2011-05-04 11:35:35 -07:00
Raphael Sofaer
efe79eb351 Fix stream on pages other than 1, rename raw_visible_posts to visible_posts 2011-04-13 14:35:20 -07:00
danielgrippi
106ae983d5 Merge branch 'master' into follow. all specs green.
Conflicts:
	app/controllers/application_controller.rb
	app/controllers/people_controller.rb
	app/models/person.rb
	config/assets.yml
	db/schema.rb
	public/javascripts/aspect-edit.js
	spec/controllers/aspects_controller_spec.rb
	spec/models/user/querying_spec.rb
	spec/spec_helper.rb
2011-04-11 17:48:37 -07:00
danielgrippi
847f4fd260 edited subscribers to include all contacts on public posts. added the ability to drop an aspect regardless of contacts contained. wip. 2011-04-05 18:53:10 -07:00
Raphael Sofaer
fdb6675f28 Make things more postgres compatible 2011-04-05 09:49:39 -07:00
MrZYX
4b7c9315c8 log error when receiving a post instead of letting the job fail with weired error later in the chain 2011-04-02 17:44:48 +02:00
danielgrippi
97d8b34599 Fix all specs, add foreign key constraints on post_visibility 2011-03-29 17:31:56 -07:00
danielgrippi
8816bd7f91 8 failures left. wip. 2011-03-29 17:31:56 -07:00
danielgrippi
9a0d6219b5 Moving PostVisibility to aspects, WIP, model specs pass 2011-03-29 17:31:56 -07:00
MrZYX
c2a4c2157d oh yeah it's delete_all on has_many, seems like I shouldn't code today… 2011-03-28 18:04:21 +02:00
MrZYX
824c4b38ad dependent delete for likes 2011-03-28 17:54:07 +02:00
MrZYX
11b0a2c19d dependent destroy for likes 2011-03-26 21:47:40 +01:00
Raphael Sofaer
b9af450628 Relayable retractions pretty much done 2011-03-25 16:09:37 -07:00
danielgrippi
c0ce0d71b8 Make pending specs green, I think there are still some to_jsons where there should be as_json 2011-03-25 15:06:22 -07:00
MrZYX
1b1a23aa8f likes/dislikes WIP TODO: better icons, better styling, integration on photo show page 2011-03-20 18:10:58 +01:00
danielgrippi
1f5edb1d92 Merge branch 'private_messages'
Conflicts:
	app/controllers/status_messages_controller.rb
	app/models/data_point.rb
	app/models/status_message.rb
	db/schema.rb
	lib/fake.rb
	public/stylesheets/sass/application.sass
	spec/models/mention_spec.rb
2011-03-08 21:23:41 -08:00
zhitomirskiyi
80a3a3446a pulling in 2011-03-06 21:37:27 -08:00
danielvincent
21fd546cd0 posts now have authors instead of people 2011-03-01 18:05:05 -08:00
danielvincent
11309574cf messages are now relayable, a comment has an author as opposed to a person. 2011-03-01 12:39:42 -08:00
danielvincent
f4e6d0d82b broke out some comment logic to a replayable module 2011-03-01 12:28:33 -08:00
Raphael Sofaer
d8956a7cd5 Add foreign key constraints 2011-02-28 15:18:35 -08:00
zhitomirskiyi
97e00f9ee3 changed the delete to a destroy on retraction, also removed a puts 2011-02-23 12:00:42 -08:00
Raphael Sofaer
ff0f37ceea eliminate one source of dup pvs 2011-02-11 18:25:57 -08:00
zhitomirskiyi
0e9fdeeab0 destroy 2011-02-10 19:55:30 -08:00
zhitomirskiyi
4033c19323 destroy_all so that the callbacks are called 2011-02-10 19:50:21 -08:00
Raphael Sofaer
7b3a2b07ee Removed n-query, created mentions table 2011-02-09 16:07:25 -08:00
maxwell
a649d18cd7 add tests to see if timestamps are updated on recevie...they are not 2011-02-08 14:07:25 -08:00