Commit graph

303 commits

Author SHA1 Message Date
Benjamin Neff
e82690963d
Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
Steffen van Bergerem
9d2763089d
Replace where...first with find_by
Fixes #7539

closes #7593
2017-08-29 02:11:17 +02:00
Benjamin Neff
b040f85790
Remove root_guid from reshares when post is deleted
And cleanup old reshares with deleted root posts

closes #7578
2017-08-26 03:08:37 +02:00
Benjamin Neff
d0b634852b
Fix belongs_to, it is now required by default 2017-08-12 15:39:20 +02:00
Benjamin Neff
eb19c327e2
Add ApplicationRecord 2017-08-12 15:39:20 +02:00
cmrd Senya
2c3f116326
Add new scopes for the Post model 2017-08-09 21:43:37 +03:00
cmrd Senya
33ad411bbd
Mentions in comments backend changes 2016-11-28 15:56:56 +02:00
Benjamin Neff
d3edbfd829 remove pending flag from posts 2016-08-08 19:37:10 +02:00
Benjamin Neff
83db0a8f3e remove activity_streams, because it was always false ... 2016-08-08 19:37:10 +02:00
Benjamin Neff
df9874b73a remove raw_message
This was only an alias for "text", and "raw_message" is also not used
for federation anymore, so we can drop it.
2016-07-17 01:40:00 +02:00
cmrd Senya
026f577bfd
Remove unused methods 2016-07-08 21:30:41 +03:00
Benjamin Neff
67688a6022 create module for author association 2016-06-26 06:21:02 +02:00
Benjamin Neff
bb66b973a6 only posts do have reshares 2016-06-26 06:21:01 +02:00
Benjamin Neff
21fd9f23da remove roxml 2016-06-26 06:21:01 +02:00
Benjamin Neff
7893a23927 add resharers and participants to subscribers on public posts 2016-06-26 06:21:01 +02:00
Benjamin Neff
566f4890a2 merge Federated::Shareable to Shareable
also drop xml-code for Shareable
2016-06-26 06:21:01 +02:00
Benjamin Neff
58a5a881cf receive local
* Contact: auto-follow-back
* Shareable: create share visibilities
2016-06-26 06:20:59 +02:00
cmrd Senya
204f58e6a7
Remove repetion of shareable initialization code 2016-05-31 21:16:13 +03:00
Dennis Schubert
69ac153fe9 Merge pull request #6745 from cmrd-senya/remove_diaspora_handle_shareables
Remove diaspora_handle from shareables
2016-03-08 23:45:16 +01:00
cmrd Senya
2986aa8b24 Remove diaspora_handle from shareables
We can determine diaspora_handle from a relation with people for the
shareables (posts, photos). So we don't need to store diaspora_handle in
the DB. Also remove tmp_old_id from photos which is not refenrenced anywhere.
2016-03-07 18:47:21 +03:00
Benjamin Neff
d94eae0d45 refactoring PostService
* move presenters back to controllers, this is view-logic
* use PostService in CommentService
* remove iframe route, this is not used anymore
* id/guid limit at 16 chars, hex(8) is 16 chars long
2016-03-07 05:52:54 +01:00
Benjamin Neff
5a46da47c3 refactoring StatusMessageCreationService
* move parameter normalization back to controller, because this is
  frontend-specific.
* if the StatusMessage is public, save also public photos
2016-03-07 00:00:27 +01:00
Dennis Schubert
7c197756dd Merge branch 'stable' into develop 2016-01-26 15:19:55 +01:00
Dennis Schubert
ad20bb052c Fix include_root_in_json misuse
since it is no longer exposed for instances, our post_presenter failed
hard.
2016-01-26 15:18:02 +01:00
Manuel Vögele
4f34ecafa4 Show posts of ignored users on their profile page 2016-01-04 18:29:30 +01:00
Lukas Matt
78f9b39e55 Use polymorphic association for the report item
* Adopt pronto suggestions

Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>
2015-10-03 17:18:03 +02:00
theworldbright
2a3dde1ae5 Refactor PostService and extract its tests
Squashed commits:

[ada0f09] Remove favorites from Posts table

closes #6208
2015-07-26 13:10:24 +02:00
theworldbright
d724397168 Refactor posts controller 2015-07-26 12:58:42 +02:00
Jonne Haß
ac52cef546 Only return the current_users participation for post interactions
closes #6007
2015-05-30 03:08:25 +02:00
Benjamin Neff
986ad0df14 fix validation for status-message when the author is missing
closes #5986
2015-05-24 11:16:05 +02:00
Benjamin Neff
9a4a7255e7 remove unused older and newer methods for posts
last renamed in 8386179f16

closes #5970
2015-05-19 10:42:39 +02:00
Jonne Haß
13f50eeee6 do not touch the own model in an after commit hook
That just recurses endlessly, fixes #5146
2014-08-24 16:03:17 +02:00
Jonne Haß
a9e107364a make status message controller spec pass and deprecation free 2014-08-23 16:34:00 +02:00
Jonne Haß
2cca5745c9 remove deprecated scoped 2014-08-23 16:34:00 +02:00
Jonne Haß
89afb616cf replace deprecated scope syntax and unify it 2014-08-23 16:34:00 +02:00
Jannik Streek
d0a77ce6b3 design for poll participation implemented, saving works as well 2014-03-31 18:14:07 +02:00
Ivan Zotov
a4ce6e267a Fix after_create to after_commit 2014-01-14 22:35:29 +04:00
Fábián Tamás László
176c6826e0 opengraph POC
Fixed small-frame opengraph view

Fixed incompletely saved OpenGraphCache bug
2013-08-04 15:42:29 +02:00
James Fleming
66a07bd938 Remove attributes protection.
Use a blacklist approach instead of a blacklist approach in Profile#receive.

Remove attr_accessible from models and make specs pass.
2013-08-02 11:39:06 +02:00
Jonne Haß
11eecc3d3a 404, not 500, if signed out user wants to see a non public/existing post
Also add some specs for Post#find_by_guid_or_id_with_user
2013-05-18 20:55:22 +02:00
Marco Gallardo
4aab8762fa Locator feature
added marker image for publisher, showing div for address, and added
functionality to close it when clicking 'X' image

showing marker image in publisher

renamed map-marker to locator

fixed style for map marker image in publisher

added locator.js to get user's location

loading google maps api

removed unecessary append and showing location next to publisher

moved location address inside div and  added image to close location

styled div location address an image to close location

removing location when clicking close image

cleaned code

cleaned code

showing loader while location is being obtained, translated normal js to
backbone structure, created locations db stuff, and removing location
div when clicking 'share'

refactored code; started to move code to backbone

refactored js code; moving functionality to backbone structure

created address function to make accessible address variable value

refactored locator.js

showing and removing location div from dom

created location; it belongs_to status_message

added location model and created association with status_message

added hidden field for location address and added respective code on js files to retrieve it on ajax call

saving location for status_message (post)

removing location when sharing

renamed locator backbone view to location, added template, showing
location, and saving lat and lng

prepared and added template to show location

added location to post model in order to have it accessible in backbone

retrieving location to show it in template

removed console.log XD

fixes when removing location

cleanind location_address hidden field when location is removed

more fixes; showing location when sharing

saving location just when it exists

created method to retrieve location address just when location was created

fixed issue about showing 'Near from' message when there was not any location

added style for location

cleaned code

renamed locator view

retrieving lat and lng from locator.js

saving lat and lng in location_coords

saving lat and lng

added style for input location_address

removed location_address  hidden field; the value will be taken directly from input with the location

replaced div with location for input; the user will be able to edit the place

avoiding submitting the form when pressing Enter key on new input for location

added missed spec file for location model

refactored location_view code

refactored location_view code

cleaned code

added sinon library for testing

added describes for new publisher's view functions

created test for destroyLocation function

added test for showLocation publisher view function

created test for avoidEnter publisher view function

removed unnecessary div

Created first test for locations view, added more specs, added Sinon.js,
and fixed issue with assets

loading locator.js for tests

moved location stuff to app/assets

moved locator.js and sinon.js to app/assets

fixed route for images

included locator.js to assets

fixed issue when post object is different than StatusMessage; also fixed issue with lat and lng

loading Sinon for specs

refactoring locator errorGettingposition and start replacing google maps stuff with OSM

added OpenLayers JS, osmlocator, and added them into the main js

changing the locator from Google to OSM instance

changing lat and lng value in the backbone view

removing google javascript tag in application layout

adding jasmine to locator test and removed locator.js

adding jasmine to locator test using OSM

adding Jasmine test to OSM locator

removed locator.js

removed require locator and updated schema

fixed js response; added location

since we are using OSM Locator we don't need locator-spec test

fixed spec for location view; we are not using google maps anymore

changed description of osmlocator-spec

fixed issue with status-message-location template

fixed style for location_address textbox

fixed tests for locator

moved split function to model

created test for location model

removed puts

added effect for location marker

added translations for locator

removed conflicting-unnecessary lines that were loading files for specs

removed sinon library; using sinon-rails gem

removed useless code

removed puts; added Rails.logger.error

added sinon.js file

added specific version of sinon-rails gem

improving validations sintax

using openlayers-rails gem

removed 'google API' text

using sinon gem

isolating LocationStream view

refactored validation

getting location when post is a Reshare

refactored code

fixed aligment for elements under location message

improved styling for location message

refactored begin-rescue block

getting absolute root instead of just the root

added address method to retrive address of location

removed code from Post model; also added descriptinon why it was removed

removed validation when retrieving address; with latest refactorizations we dont need them any more

interpolated location; using file in locales

fixed width for div of location

moved Sinon gem into development and test group

fixed method's description

added missed indexes

updated schema with locations table

removed openlayers-rails gem

preventing location to be saved if there are not coordinates

fixed spec; wrong closing tag
2013-05-02 17:31:53 -05:00
L3MNcakes
1120cba5f0 Issue #3939: Posts to Facebook do not delete 2013-02-18 18:21:59 +00:00
Fabián Rodríguez
99abc22403 remove unused methods 2012-11-21 18:26:17 -02:00
Florian Staudacher
8ca39f5936 show a "post is not public" message when visitor is not logged in
and tries to access a show page of a non-public post
2012-06-07 22:16:37 +02:00
Alex Connor
fe984eb426 #3287 using reorder instead of order for newer, older 2012-05-20 18:21:34 -05:00
Maxwell Salzberg
ab2e740ca2 upgrade to Rails 3.2.3 2012-05-14 21:53:16 -07:00
Dennis Collinson
f6e3c1b88b seperate interactions from posts
Lazily load post interactions on show page
hella refactorz
2012-05-12 17:41:58 -07:00
Dennis Collinson
51b1ade3bc DC DG; added LastThreeComments decorator so we don't have to load those comments when not needed (i.e. new profile pages) 2012-05-10 13:53:00 -07:00
Dennis Collinson
efa79a4ad7 Refactor Post Presenter
and comment presenter
2012-05-10 12:24:21 -07:00
Dennis Collinson
d64eb529d2 MS DC; text now overlays for wallpaper; ALSO. really sorry @danielgrippis stuff does not work in firefox. or safari.
or konqueror. we will talk to him about it later
2012-04-23 17:30:23 -07:00