Commit graph

211 commits

Author SHA1 Message Date
Florian Staudacher
ea397ffdfb Add connection test for pods in the network
* add a class for checking pod connectivity
* extend pod model to handle new functionality
* add an admin frontend to list pods and re-trigger checks manually
* add a daily worker to run through all the pods
* add unit tests for most of the new code
2015-08-24 22:04:53 +02:00
Jonne Haß
2bf6c87964 Merge branch 'stable' into develop 2015-08-23 22:49:51 +02:00
theworldbright
6e74ee7d21 Make PostPresenter inherit from BasePresenter
closes #6315
2015-08-23 22:49:45 +02:00
theworldbright
335b1c32aa Refactor post presenter 2015-08-23 22:49:12 +02:00
Steffen van Bergerem
89a3ea6d20 Merge branch 'stable' into develop 2015-08-23 14:45:33 +02:00
Jonne Haß
a1ca45b201 Update NodeInfo to final 1.0 schema
closes #6340
2015-08-23 14:45:20 +02:00
Jason Robinson
cb909c0d70 Strip leading/trailing whitespace from pod tags list in social relay well known
Closes #6303
2015-08-09 00:33:35 +03:00
Jonne Haß
6ee3843449 Merge branch 'stable' into develop 2015-07-26 13:11:49 +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
Dennis Schubert
e8297f8d6b Merge pull request #6207 from jaywink/social-relay
Implement social relay requirements
2015-07-25 23:01:45 +02:00
Jonne Haß
c76cf90b62 Readd legacy services to statistics.json 2015-07-24 10:57:37 +02:00
Jonne Haß
d68b3f02bd Expose whether chat is enabled as NodeInfo metadata
related to #6211
2015-07-24 04:16:54 +02:00
Dennis Schubert
be8f920c29 Merge branch 'stable' into develop 2015-07-24 04:05:32 +02:00
Jonne Haß
c928d6c117 Expose whether chat is enabled as NodeInfo metadata
related to #6211
2015-07-24 03:51:31 +02:00
Jonne Haß
487b0d90ca Implement NodeInfo 2015-07-24 03:50:02 +02:00
Jason Robinson
bdf6c71772 Implement social relay functionality
* .well-known/social-relay - to serve subscription preferences to relays
* Workers.deferred_dispatch relay carbon copy functionality for outbound sending

See discussion here: https://www.loomio.org/d/9vpoe0UR/public-post-federation#comment-730911 and spec here: https://wiki.diasporafoundation.org/Relay_servers_for_public_posts
2015-07-18 21:29:31 +03:00
cmrd Senya
7a5a0a909a Allow extended profile fields (previously private profile) to be set public (#5684).
This adds a new boolean field "public_details" to person model.
By default it is false and represents old behaviour. When it is
set to true, extended profile (bio,location,gender,birthday)
get available to people who didn't log into diaspora and to
people you don't share with (i.e. it is made public).

In UI, a bootstrap-switch added on the profile-edit page in order to
change the setting.

This also changes wording from public/private profile to basic/extended.
The latter could be public and limited.
2015-07-11 04:36:45 +03:00
Jonne Haß
1cd2562572 Merge branch 'stable' into develop 2015-07-02 11:12:16 +02:00
Dennis Schubert
e92c8000ba Do not leak private profile fields in JSON format
Signed-off-by: Dennis Schubert <mail@dennis-schubert.de>
2015-07-02 10:07:59 +02:00
fla
7f6609d17b Remove old service keys in statistics.json 2015-06-13 11:03:47 +02:00
Jonne Haß
ac52cef546 Only return the current_users participation for post interactions
closes #6007
2015-05-30 03:08:25 +02:00
Jason Robinson
7c0e50c2c2 Introduce 'authorized' configuration option for services
Since the Facebook API has changed and additional permissions are required for all users on a pod to cross-post, an additional 'authorized' flag is needed to be set for the Facebook service.
This flag allows either all users, one user or no users to use the cross-posting service.

Clarifies the situation for #5923, #5260 and #5085.

closes #5985
2015-05-25 04:18:38 +02:00
Steffen van Bergerem
05ec235ea3 Pass along current_user in ContactPresenter#full_hash_with_person
closes #5936
2015-05-09 23:48:59 +02:00
Benjamin Neff
344b198900 use camo for medium and small avatars 2015-04-24 03:10:48 +02:00
Jonne Haß
73b6c75278 On reshare insert the reshare built from the response
Also make sure comments_count and the like is always set in the
response.
2015-03-23 23:02:23 +01:00
Jonne Haß
99ea156e1c Refactor User.total_users into a scope 2015-02-27 16:30:51 +01:00
Jonne Haß
95053ccbf2 Merge pull request #5351 from MarcBurt/5041-Total-user-statistic-shouldnt-include-closed-accounts
5041 total user statistic shouldnt include closed accounts
2015-02-27 16:02:35 +01:00
Jonne Haß
be1ab6c6a3 Merge branch 'collimarco-issue5350' into develop 2015-02-27 15:33:55 +01:00
Marc Burt
9f5131b6ec Fixed #5041 with new User method to find total accounts excluding closed and invitations 2015-02-08 13:49:12 +00:00
Augier
55d258c5ac Fix registrations displaying 2015-01-30 18:00:22 +01:00
Flaburgan
69b881f34b Fix monthly and halfyear active users count 2015-01-26 10:03:37 +01:00
Marco Colli
eccab62e32 Allow user to enable / disable notifications for a post from stream #5350 2015-01-25 18:40:47 +01:00
SansPseudoFix
dc44485230 Feature : Statistics design 2015-01-24 22:34:41 +01:00
Steffen van Bergerem
9de6a26a22 Port contacts page to backbonejs 2015-01-04 17:13:18 +01:00
Dennis Schubert
4c98445f1c Fix presenters instead of modifying the getters 2014-11-09 07:47:40 -08:00
Dennis Schubert
6808150920 Method calling convention and doc improvements
... and a stealth-commit of an already introduced bug prevention system.
;)
2014-11-09 07:20:30 -08:00
Dennis Schubert
92cd4e6b78 Use camo for Markdown images
just a quick proof of concept
2014-11-08 05:14:18 +01:00
Jonne Haß
a7c702d631 Merge pull request #5308 from Flaburgan/add-network-key-to-statistics
Add network key to statistics.json

Conflicts:
	Changelog.md
2014-10-14 13:25:16 +02:00
flaburgan
adc839d620 Add network key to statistics.json, close #5042 2014-10-08 01:16:54 +02:00
Alex Nordlund
acc7377e5f Removed setting for statistics, showing both instead. 2014-10-05 01:45:48 +02:00
Alex Nordlund
03f3c74cee Moved services to a JSON list.
Added AppConfig.privacy.statistics.deprecated_format to toggle showing the old style format.
2014-10-05 01:07:30 +02:00
Jonne Haß
66c2f7f869 Fix statistics_presenter_spec 2014-10-04 01:01:19 +03:00
Jason Robinson
309e690a66 Fix services in statistics.json.
Currently there is a bug in configurate that reports incorrectly the services settings if they are set as ENV variables, instead of diaspora.yml settings.
This commit works around that issue by changing the way the setting is fetched.
2014-10-03 23:54:42 +03:00
Florian Staudacher
be86014540 rspec should now be running a green build 2014-09-15 01:37:23 +02:00
Florian Staudacher
89d468cdcc first round of specs and code cleanups/fixes 2014-09-15 01:37:23 +02:00
Florian Staudacher
1f724dd123 * add a (hash)tag helper for handlebars
* re-add stream on profile page
* more controller refactoring
2014-09-15 01:37:23 +02:00
Florian Staudacher
2572fb77fc * refactored text direction detector into helper (also for handlebars)
* added handlebars helper for markdown formatting
* finished port of profile sidebar view to handlebars template
* people_controller refactoring
2014-09-15 01:37:23 +02:00
Florian Staudacher
9a16560d8d * rename profile header view to make name more accurate
* include 'js-routes' for rails routes in javascript
  (TODO: config options?)
* add handlebars helper for rails routes
2014-09-15 01:37:23 +02:00
Florian Staudacher
0092c9c483 * create a handlebars view for the profile header
* unblock the user via ajax
2014-09-15 01:37:23 +02:00
Florian Staudacher
fba3092c61 * cleanup people_controller#show, add people_controller#stream for json
* introduce new presenters and extend the functionality of the BasePresenter
* add a handlebars template for the profile sidebar, render it everytime we need to update
* introduce a 'aspect_membership:update' global event
2014-09-15 01:37:23 +02:00
Jonne Haß
09f0665225 replace deprecated usages for all 2014-08-23 16:34:01 +02:00
damzcodes
de069962b3 Service have been added to /statistics.json
Services have been added to /statistics.json

tidying up

edits
2014-08-15 14:02:03 +01:00
Jason Robinson
356096a7eb Merge pull request #4836 from MrZYX/message_renderer
Introduce message renderer
2014-04-13 15:00:46 +03:00
Hincu Petru
2ae4d41db3 Fixed 4903 and not render vote form when user is not logged 2014-04-05 14:29:07 +00:00
Jannik Streek
12fabe2fb9 finalized voting design + some design fixes + improved code 2014-03-31 18:14:07 +02:00
Jannik Streek
d0a77ce6b3 design for poll participation implemented, saving works as well 2014-03-31 18:14:07 +02:00
Jonne Haß
8280556a47 Introduce message renderer
This new class replaces all existing server side message
rendering helpers and is the new global entry point for such
needs. All models with relevant fields now expose an instance
of MessageRenderer for those. MessageRenderer acts as
gateway between the existing processing solutions for markdown,
mentions and tags and provides a very flexible interface for
all output needs. This makes the API to obtain a message
in a certain format clear. As a result of centralizing the
processing a lot of duplication is eliminated. Centralizing
the message processing also makes it clear where to change
its behaviour, add new representations and what options
are already available.
2014-03-15 17:16:17 +01:00
Jannik Streek
d603ff818c added comment count to statistic to calculate posts/comments ratios
fixeds tests for comment count in statistics

added changelog entry and default entry
2014-02-21 12:25:23 +01:00
Jonne Haß
c660c90091 Merge pull request #4612 from diaspora/drop_spv_old_code
Drop spv old code
2013-12-11 07:41:51 -08:00
Fabian Rodriguez
6c8c4fc99e remove template picker functionality 2013-12-03 20:53:00 -02:00
Jason Robinson
2c83d0e846 Statistics route with general info, some user and total posts stats. By default statistics off, enabled in settings. 2013-12-02 22:35:18 +02:00
Fabian Rodriguez
d7b8cb2997 remove #next_post_path and #previous_post_path from postpresenter 2013-12-01 20:55:48 -02:00
Jonne Haß
75d3b1598f make sure comments are sorted in ascending order from oldest to newest in the SPV 2013-08-22 16:21:51 +02: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
Damien
f4b3f2fd1e Consider Markdown header content as post title
clarify regexp and correct some bad backtracking

add specs

rewrite regex

convert mardown style title to plain text title

fix bad indentation

add jasmine test for post-viewer.js

tries to fix bad jasmine test
2013-07-31 14:59:02 +02:00
Steffen van Bergerem
17876d1de6 show medium avatar in hovercard 2013-06-07 11:23:28 +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
Jonne Haß
3fc3b249e7 End the require mess
* Rename and reorganize post fetcher to fix autoloading, also let it use
  Faradays default connection so we get nice redirects
* Add initializer to load libs at a central place
* added lib dir to autoload_once paths to increase thread safety
* Moved lib/exceptions.rb to lib/diaspora/ to conform namespacing
2013-03-21 23:37:53 +01:00
Fabián Rodríguez
f978a75b8c bootstrap my_aspects data 2013-01-16 19:33:20 -02:00
Florian Staudacher
0092acd492 re-add hovercards
* added a presenter for hovercard json
* added new backbone view for handling hovercard JS
* refactoring of PeopleController

* finished the backbone js version of hovercards
* don't try to make people_controller more restfull, out of scope
  just add a new route and use that for hovercard json
* added spec for people_controller#hovercard
* add new exception for "AccountClosed" to be able to raise from anywhere

* removed legacy code, since everything got ported to backbone
  (except the "cache" stuff, but that's not strictly necessary)
2012-12-28 22:37:13 +01:00
Jonne Haß
1a93ccd548 don't error out if the root of a reshare of a reshare got deleted, fixes #3546 2012-10-24 19:51:31 +02:00
Jonne Haß
89c1fd5f7f query the set url only through #pod_uri in the app 2012-09-26 20:19:37 +02:00
Jonne Haß
2a4db54db9 New configuration system
* Throw away old system
* Add new system
* Add new example files
* Replace all calls
* add the most important docs
* Add Specs
* rename disable_ssl_requirement to require_ssl
* cloudfiles isn't used/called in our code
* since community_spotlight.list is only used as enable flag replace it with such one and remove all legacy and irelevant codepaths around it
* die if session secret is unset and on heroku
* First basic infrastructure for version information
2012-09-26 20:19:37 +02:00
Jonne Haß
e70e48d6ca some refactoring regarding the law of demeter 2012-09-23 19:33:19 +02:00
Sean Tilley
49ea8c8563 Strip Beta Features 2012-09-11 21:52:53 -05:00
Steven Hancock
a8de3a5a3f Rails.root and File.join cleanup
- `Rails.root` is a `Pathname`, so let's use `Rails.root.join`
- Clean up most of the remaining `File.join`s
2012-06-11 03:13:20 -07:00
danielgrippi
c6b8d75313 DG MS; cool header with background in new stream 2012-05-22 19:00:22 -07:00
Florian Staudacher
788f328a77 resolve reshare root posts to the first one 2012-05-18 01:45:41 +02: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
Jonne Haß
7a6d325f64 looks like there are sometimes objects passed into post presenter that respond to root while root is nil 2012-05-11 14:23:05 +02:00
Dennis Collinson
3326bc5bb4 present reshares 2012-05-10 15:16:05 -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
danielgrippi
0ec364e44c DG MS; popup on services, inlined in the composer 2012-05-08 18:09:33 -07:00
Dennis Collinson
d1d99d5dd4 Jamie Cai DC refactor isOwnProfile, fix tests 2012-05-07 17:53:37 -07:00
Dennis Collinson
1c135b61fd Jamie Cai DC message in profile when user has no posts 2012-05-07 15:56:30 -07:00
Dennis Collinson
0fc399243b fix next post and previous post, more efficient
make controller actions
make the presenter reflect that it is instance data ;-p

needs tests lol.
2012-05-04 18:25:09 -07:00
danielgrippi
52efb3710c show a follow button for users with pre-existing contacts (legacy beta testers) 2012-04-28 14:13:43 -07:00
Dennis Collinson
8386179f16 max, you're a princess, WIP 2012-04-19 11:15:59 -07:00
Maxwell Salzberg
c9e3852de8 oembed mostly works 2012-04-18 16:12:56 -07:00
Maxwell Salzberg
31172a9959 basic oembed provider set up... too tried to finish this now 2012-04-18 16:12:56 -07:00
Dennis Collinson
775eca0026 MS DC You can has choose a template 2012-03-27 14:52:53 -07:00
danielgrippi
74e9cd6ca8 DG MS; added checkboxes for services in the new publisher (currently not working) / user presenter contains services 2012-03-27 14:52:50 -07:00
Dennis Collinson
cc04f492f2 MS DC added aspect presenter, and include the data on the user 2012-03-27 14:51:40 -07:00
Maxwell Salzberg
879b3d135a title now updates with switch 2012-02-27 18:40:56 -08:00
Maxwell Salzberg
22cda15aa8 presenter now has a title 2012-02-27 18:11:41 -08:00
Dennis Collinson
b28508ecbc MS DC show last post and show page works unauthenticated
phasing out app.user() for app.currentUser
2012-02-24 19:09:00 -08:00
Dennis Collinson
6e55d6c011 DC MS DG; un-namespace single post JSON responses 2012-02-24 13:30:16 -08:00
danielgrippi
8f4fed8c0e add participants to info pane on post viewer 2012-02-22 13:15:54 -08:00
Maxwell Salzberg
cd274cad0d adding likes, reshares and comments in a naive presenter way 2012-02-21 22:13:46 -08:00
Maxwell Salzberg
7755c254fb some basic tests for post presenter; added user.reshare! 2012-02-21 21:56:11 -08:00
danielgrippi
899136d0e5 display proper counts after feedback actions; modified destroy responses to return PostPresenter objects 2012-02-21 21:44:44 -08:00
danielgrippi
a1fe55fcb7 mark icons colored if user has interacted with a post. 2012-02-21 15:23:29 -08:00
danielgrippi
2815885bcf add user_like to PostPresenter; use proper inheritance for feedback views 2012-02-21 15:23:29 -08:00
danielgrippi
ca8f136cec fixed back/forward 2012-02-21 15:23:29 -08:00
danielgrippi
30de08b340 fix post presenter / arrow ordering 2012-02-21 15:23:28 -08:00
Maxwell Salzberg
653e93fb11 fix the query to only cycle thru the current authors posts 2012-02-21 15:23:28 -08:00
Maxwell Salzberg
25cf776059 the previous and next posts are now supplied in json of the presenter; give the template creator a default value 2012-02-21 15:23:28 -08:00
danielgrippi
ff875a5b3c DG MS; determine what template to use on the client from the server 2012-02-21 15:23:27 -08:00
Maxwell Salzberg
063912287c use the user presenter, luke 2012-02-16 13:19:14 -08:00