Commit graph

2122 commits

Author SHA1 Message Date
cmrd Senya
c63493b0d1
New Exporter::NonContactAuthors class
This class is capable of quering a list of people from authors of given posts that are non-contacts of a given
user.
2017-08-09 21:43:31 +03:00
cmrd Senya
c985af1f85
New Exporter::OthersRelayables class
This class implements methods that allow to query relayables (comments, likes, participations,
poll_participations) of other people for posts of the given person.
2017-08-09 18:09:04 +03:00
cmrd Senya
fca6121c6a
Exporter::PostsWithActivity class
This class allows to query posts where a person made any activity (submitted comments,
likes, participations or poll participations).
2017-08-09 18:09:04 +03:00
Benjamin Neff
1007b3cdbd
Use Rails.application.assets_manifest.assets instead of json file 2017-07-31 22:56:05 +02:00
Benjamin Neff
7f8108e4ac
Precompile bookmarklet to use in production
`Rails.application.assets` is only available when `config.assets.compile`
is true (which is false in production). So the old way with a separate
rake task doesn't work in production. But we can get the filename of the
precompiled file from `Rails.application.assets_manifest.assets`.
2017-07-31 22:43:28 +02:00
Benjamin Neff
91ec412f14
manifest-*.json is now called .sprockets-manifest-*.json 2017-07-30 04:47:16 +02:00
Benjamin Neff
a4c26b7464
Exclude ignored people from followed tags when building stream-relation
This improves the main stream when you have less or inactive contacts
and ignored an active person that posts many posts with tags. When the
person is only removed after collecting all post ids, you don't see
posts with tags from other people.
2017-07-23 23:33:43 +02:00
Benjamin Neff
8942bb98c8
Send and receive public flag for profile 2017-07-23 02:36:29 +02:00
Benjamin Neff
a931bee319
Make Participation entity non-relayable 2017-07-03 03:14:42 +02:00
cmrd Senya
c2b9b8ab54
Use ContactRetraction for stop sharing with someone 2017-07-03 03:14:42 +02:00
Benjamin Neff
e2a40bb643
Send Relayables with parent author when the parent is local
Needed for diaspora/diaspora_federation#64
2017-07-03 03:14:42 +02:00
Benjamin Neff
3ab674552f
Rename xml_order to signature_order 2017-07-03 03:14:41 +02:00
Benjamin Neff
0f551c7b19
Fix public flag for contact retractions 2017-07-03 03:14:41 +02:00
Benjamin Neff
381c03cfd7
Remove backward-compatibility for Retractions 2017-07-02 23:56:01 +02:00
Benjamin Neff
b6b0aac969
Send only Retractions
Related to diaspora/diaspora_federation#27
2017-07-02 23:56:00 +02:00
Benjamin Neff
e907b3eb18
Send Contact entity for start/stop sharing
Related to diaspora/diaspora_federation#32
2017-07-02 23:56:00 +02:00
Benjamin Neff
f6dc809e29
Send new MagicEnvelope and EncryptedMagicEnvelope
Related to diaspora/diaspora_federation#30
2017-07-02 23:56:00 +02:00
Benjamin Neff
95def40c55
Make Message entity non-relayable
Related to #36
2017-07-02 23:56:00 +02:00
Benjamin Neff
5e2d063c49
Hash from federation entity now contains the correct data-type 2017-07-02 23:56:00 +02:00
Benjamin Neff
5e3ea249a9
Replace additional_xml_elements with additional_data for relayables 2017-07-02 23:55:59 +02:00
Dennis Schubert
1e06fd786c
Merge branch 'next-minor' into develop 2017-05-21 12:06:41 +02:00
Benjamin Neff
7934c1e969
Add NodeInfo 2.0 support 2017-05-21 12:05:54 +02:00
Benjamin Neff
d0fcdc254e
Only backport mention syntax when the author is local
We don't need to change new to old syntax when we receive a post from a
newer pod, since we can handle the new syntax. This is only needed when
sending it to older pods.

related to #7392
2017-03-25 23:42:19 +01:00
Benjamin Neff
ae687cf1d5
Merge branch 'next-minor' into develop 2017-03-05 00:01:11 +01:00
Benjamin Neff
8e4261100b
Create asterisk.png without digest after precompile
fixes #7317

closes #7322
2017-03-04 23:58:08 +01:00
Benjamin Neff
e82ac2199f
Merge branch 'next-minor' into develop 2017-03-04 22:11:22 +01:00
Benjamin Neff
13f549b2ba
Bump rubocop
And update config for new/updated cops.
2017-03-04 22:09:54 +01:00
Benjamin Neff
e1bf447aad
Merge branch 'next-minor' into develop 2017-03-04 21:08:18 +01:00
Steffen van Bergerem
12deda1429
Change regexp for hashtags
Fixes #5765, fixes #5815, supersedes #6099.

closes #7350
2017-03-04 21:08:11 +01:00
Benjamin Neff
5c444e62be
Add @ before mentions for mobile and notifications
fixes #7269
2017-02-12 20:10:36 +01:00
Benjamin Neff
2d8d0255dd
Improve handling with new mention syntax without name
* fallback to diaspora ID when person is not found
* fix filter_people when the person is not found
* write some more tests
2017-01-31 20:56:22 +01:00
Benjamin Neff
84e2a131cf
Remove { and } from the name when backporting mentions
Because } is not compatible with the regex.
2017-01-31 20:56:21 +01:00
Benjamin Neff
0e89d60117
Use name of mentioned person in plain text 2017-01-29 03:06:26 +01:00
Benjamin Neff
322f92110a
Backport new mention syntax to old syntax for backward compatibility
See #7276
2017-01-29 03:06:26 +01:00
Benjamin Neff
a0d200d209
Update regex for new mention syntax
See #7276
2017-01-29 03:06:26 +01:00
Dennis Schubert
96b7c6b429
Merge branch 'next-minor' into develop 2017-01-15 00:13:17 +01:00
Benjamin Neff
8e196a34a1
Hash from federation library now contains strings
closes #7258
2017-01-15 00:13:11 +01:00
Benjamin Neff
b79ccc5207
Add created_at to comments 2017-01-15 00:12:08 +01:00
Steffen van Bergerem
c164dac7a4
Merge branch 'next-minor' into develop 2017-01-07 18:32:15 +01:00
Frédéric Bolvin
7cc4b46d7e
Replaced fileuploader-custom with FineUploader
closes #7083
2017-01-07 18:32:08 +01:00
cmrd Senya
33ad411bbd
Mentions in comments backend changes 2016-11-28 15:56:56 +02:00
Steffen van Bergerem
e186811aed Remove unused contacts link methods
closes #7221
2016-11-26 02:25:29 +01:00
Steffen van Bergerem
1863137161 Use string-direction gem for rtl detection
closes #7181
2016-11-15 22:33:56 +01:00
cmrd Senya
a80806ca58
Fix ID token issuer field to match discovery data
OpenID Connect spec says:

"The issuer returned by discovery MUST exactly match the value of iss in the ID Token."

https://openid.net/specs/openid-connect-core-1_0.html#IssuerIdentifier

closes #7081
2016-10-27 02:22:27 +02:00
hilkoc
b7791e6c9d Add user setting for default post visibility
fixes #4319

closes #7118
2016-10-26 02:48:11 +02:00
Benjamin Neff
0a264c1fe0
Set redis url for sidekiq cleanup migration task
closes #7125
2016-09-30 01:43:26 +02:00
Benjamin Neff
b8c76a3317
Trigger getting started with backbone 2016-09-28 21:59:08 +02:00
Benjamin Neff
fe5811bb65
Don't federate to pods that are offline for more than two weeks
Also fix a case where offline_since can be nil.

fixes #6220

closes #7120
2016-09-25 03:20:41 +02:00
Benjamin Neff
fe071aa2a2
Deliver to each recipient only once
closes #7071
2016-09-20 04:25:04 +02:00
Benjamin Neff
4fea926057
Only update interacted_at on new comments
I got feedback from many users, that they don't understand how the "my
activity" stream is sorted, because they have posts on the top, but
don't see why. The user doesn't see if a like was added, and it is also
not imported for the user to see the post again then. And we have
notifications if someone likes a users own posts, so no need to move it on
top of the "my activity" stream here too.

closes #7030
2016-09-04 03:29:59 +02:00
Dennis Schubert
003672f0b1
Merge pull request #7011 from SuperTux88/fix-author-not-lowercase
Use Person.by_account_identifier to find the author
2016-08-21 14:26:20 +02:00
Benjamin Neff
1d5080888f Use Person.by_account_identifier to find the author 2016-08-21 04:01:42 +02:00
Benjamin Neff
8d725160f9 Use https for the pod_uri if require_ssl is true 2016-08-21 01:48:52 +02:00
Jonne Haß
fedd378dcf
Merge pull request #6992 from SuperTux88/4491-fetch-mentioned-people
fetch mentioned people if they don't exist locally yet
2016-08-16 10:41:02 +02:00
CSammy
1d793fcc49 Reused tag stream query for tag pages. 2016-08-15 04:39:11 +02:00
Benjamin Neff
80d1352ba4 Cleanup old rake tasks
* accounts:run_deletions: was added with 0.4.0.0 two years ago for one-time usage.
* db:rebuild: db:reset does basically the same
* db:integration:preprare: the integration environments are not used.
* db:reset: there is a default db:reset, no need to write our own.
* db:drop_integration: the integration environments are not used.
* db:fix_diaspora_handle: really old migration from 2010
* db:move_private_key: also old migration from 2010
* maintenance:clear_carrierwave_temp_uploads: tmp/uploads doesn't exist anymore. And we have CleanCachedFiles as cronjob.
* maintenance:install_logrotate_config: diaspora has built-in logrotate support now, and people who want to use logrotate instead can write their own configs with the values they want.
* migrations:copy_hidden_share_visibilities_to_users: old migration from 2012
* migrations:invitations: legacy invitations were removed with #6976
* migrations:absolutify_image_references: old migration from 2010
* migrations:rewire_uppercase_hashtags: old migration from 2012
* migrations:remove_uppercase_hashtags: old migration from 2012
2016-08-14 19:42:30 +02:00
cmrd Senya
9546fddb9e
[API] don't store ID tokens in DB
fix #6857
2016-08-13 20:09:43 +03:00
Dennis Schubert
3942dca08f
Merge pull request #6972 from jhass/queue_migration
Add rake task to move jobs from any legacy queue to the default queue
2016-08-13 17:31:14 +02:00
Jonne Haß
b2fa3357eb
Merge pull request #6976 from SuperTux88/cleanup-invitations
Cleanup invitations
2016-08-13 14:16:41 +02:00
Steffen van Bergerem
da5aef2b75
Fix charcounter position in publisher 2016-08-13 03:21:40 +02:00
Benjamin Neff
66b7b7e27a Cleanup legacy invitations from code
Fixes #5116
2016-08-13 01:47:27 +02:00
Jonne Haß
5afe582057
Add rake task to move jobs from any legacy queue to the default queue 2016-08-11 22:40:49 +02:00
Jonne Haß
e70ffebc49 Merge pull request #6805 from cmrd-senya/mention-name-fixup
Fix up the meaning of the name parameter in mention
2016-08-11 13:28:02 +02:00
cmrd Senya
d200e92aeb Fix up the meaning of the name parameter in mentions
The desktop frontend now treats the "name" parameter of mention as
a string to display unconditionally. But the Diaspora::Mentionable
renders mentions the different way: "name" is treated as a fallback
string which is rendered only if the person's name is unavailable.
This reflects on the mobile version ATM. This patch makes it behave
the same way as the current desktop version does.
2016-08-11 13:19:48 +03:00
cmrd Senya
89b12345bb Rake task for legacy sidekiq queues 2016-08-10 08:51:22 +00:00
Benjamin Neff
d3edbfd829 remove pending flag from posts 2016-08-08 19:37:10 +02:00
Benjamin Neff
ecd13fc713 cleanup old attributes from code 2016-08-08 19:37:09 +02:00
Benjamin Neff
1d8ce00bef save signature data on receive 2016-08-08 18:56:37 +02:00
Benjamin Neff
2a6ca1b831 use signature data for federation 2016-08-08 18:56:37 +02:00
Benjamin Neff
081d0167b7 add models for signature data 2016-08-08 18:56:37 +02:00
Steffen van Bergerem
ba26175421
Fix duplicate activity stream posts 2016-08-07 02:07:05 +02:00
Sam Davarnia
2a2b604a60 move photo extraction to a class
style improvements

new line

applied changes

applied changes
2016-07-18 15:05:44 +03:00
Benjamin Neff
2cd831f94e also validate remote posts
all data is included in the federated status_message, so we can validate
on receive. add the photos to the status_message before save.
2016-07-17 01:40:00 +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
Benjamin Neff
32cc0951bb bump diaspora_federation 2016-07-15 02:02:55 +02:00
Steffen van Bergerem
58c7478133
Remove messagebus_ruby_api gem
Messagebus closed in 2015. See https://web.archive.org/web/20150623093956/https://www.messagebus.com/ for more information.
2016-07-07 18:48:31 +02:00
Benjamin Neff
824201fedc fetch mentioned people if they don't exist locally yet
fixes #4491
2016-06-27 17:04:22 +02:00
Benjamin Neff
c0ab42fecc check if links is an array in the JRD 2016-06-27 04:04:09 +02:00
Benjamin Neff
2a0e87957f validate NodeInfo json against schema in ConnectionTester 2016-06-27 04:04:09 +02:00
Benjamin Neff
da1a02892d log backtrace for unexpected errors in ConnectionTester 2016-06-27 04:04:09 +02:00
Jonne Haß
5d318400c9
Diaspora::Federation::Receive::ignore_existing_guid returns nil when
ignoring the error message

Previously it returned the return value of Logging::Logger#warn, which
is true for loggers that log the warn level. However
Diaspora::Federation::Receive::receive_relayable checks the return value
for truthiness in order to decide whether to attempt to relay it,
resulting in a NoMethodError: undefined method `parent' for
true:TrueClass in Diaspora::Federation::Receive::relay_relayable

This change is cosmetic as the exception raised prevented any action
that shouldn't happen anyway, so there's no actual logic change.
2016-06-26 17:01:33 +02:00
Benjamin Neff
9fda255add use the parent author of the target as sender for relayable retractions 2016-06-26 11:05:23 +02:00
Benjamin Neff
7241b1c054 use the parent author as salmon sender, if the parent author is local 2016-06-26 10:28:32 +02:00
Benjamin Neff
3b1d113a9a add own posts to activity-stream again 2016-06-26 06:21:03 +02:00
Benjamin Neff
e08306dab4 remove participation parent author check
the check that the participation parent author is local is now done in
the diaspora_federation gem
2016-06-26 06:21:03 +02:00
Benjamin Neff
65f03b2d08 extract mappings between diaspora and the federation gem 2016-06-26 06:21:02 +02:00
Benjamin Neff
7bdf4921fd use private_class_method with returned symbol of def 2016-06-26 06:21:02 +02:00
Benjamin Neff
bb0d7e46dc add #object_to_receive to Diaspora::Federated::Base 2016-06-26 06:21:02 +02:00
Benjamin Neff
1cf11db634 remove diaspora_handle setter to set author 2016-06-26 06:21:02 +02:00
Benjamin Neff
5e16b9c7cd add author to subscribers of public shareables to ensure local delivery 2016-06-26 06:21:02 +02:00
Benjamin Neff
a81bdac38c don't send relayables back to sender pod
send retraction for relayable to target author if retracted by parent author
2016-06-26 06:21:02 +02:00
Benjamin Neff
9dfa8e1442 send retractions for public relayables privately if the parent is remote 2016-06-26 06:21:02 +02:00
Benjamin Neff
f58167c154 disconnect when receiving a Contact with sharing=false 2016-06-26 06:21:02 +02:00
Benjamin Neff
2367be3f66 move Federated::Generator to Diaspora::Federated::Generator 2016-06-26 06:21:02 +02:00
Benjamin Neff
709ad6e909 Participation is not relayable anymore
only deliver to parent author
2016-06-26 06:21:02 +02:00
Benjamin Neff
1c291260a2 create module for target association 2016-06-26 06:21:02 +02:00
Benjamin Neff
c8d43a893d move Guid module to fields 2016-06-26 06:21:02 +02:00
Benjamin Neff
67688a6022 create module for author association 2016-06-26 06:21:02 +02:00
Benjamin Neff
b39f3ccc74 relay relayables after receive
also refactored relayable specs to use `let`
2016-06-26 06:21:02 +02:00
Benjamin Neff
91c6c74ca0 retract relayables if the author is ignored by the parent author 2016-06-26 06:21:02 +02:00
Benjamin Neff
c15babdc9f allow to dispatch to specific subscribers 2016-06-26 06:21:02 +02:00
Benjamin Neff
57dbcc0e67 add root author to reshare subscribers 2016-06-26 06:21:02 +02:00
Benjamin Neff
03123f1c4d remove more unused code and cleanup 2016-06-26 06:21:01 +02:00
Benjamin Neff
2476b74dbe refactoring delete from services 2016-06-26 06:21:01 +02:00
Benjamin Neff
dee8bc6f0e write specs for dispatcher 2016-06-26 06:21:01 +02:00
Benjamin Neff
f95e0faa37 delete old postzord dispatcher 2016-06-26 06:21:01 +02:00
Benjamin Neff
bb66b973a6 only posts do have reshares 2016-06-26 06:21:01 +02:00
Benjamin Neff
0e6446d05f create ShareVisibilities with batch import
and delete old batch worker and receiver
2016-06-26 06:21:01 +02:00
Benjamin Neff
4d8211b641 remove old SignedRetraction and RelayableRetraction 2016-06-26 06:21:01 +02:00
Benjamin Neff
c8c489eafd remove post fetcher 2016-06-26 06:21:01 +02:00
Benjamin Neff
51aca4506f remove HttpMulti and HydraWrapper 2016-06-26 06:21:01 +02:00
Benjamin Neff
ae05d4e928 use Diaspora::Federation::Dispatcher everywhere 2016-06-26 06:21:01 +02:00
Benjamin Neff
b0942bc219 remove salmon code 2016-06-26 06:21:01 +02:00
Benjamin Neff
21fd9f23da remove roxml 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
645034800d deliver public posts to relay 2016-06-26 06:21:01 +02:00
Benjamin Neff
902d7faca4 relay retractions for relayables 2016-06-26 06:21:01 +02:00
Benjamin Neff
42995cacc0 deliver retractions to services 2016-06-26 06:21:01 +02:00
Benjamin Neff
3df70bb205 send retractions for public targets publicly 2016-06-26 06:21:01 +02:00
Benjamin Neff
793f45ef2c send retractions only to remote subscribers 2016-06-26 06:21:01 +02:00
Benjamin Neff
65ba573a3b Contact retraction 2016-06-26 06:21:00 +02:00
Benjamin Neff
89fbcf7c56 federate retractions 2016-06-26 06:21:00 +02:00
Benjamin Neff
86b37466d5 add DeferredRetraction worker 2016-06-26 06:21:00 +02:00
Benjamin Neff
7db9d7733c deliver to pubsubhubbub 2016-06-26 06:21:00 +02:00
Benjamin Neff
b89c1d0cd7 send private message 2016-06-26 06:21:00 +02:00
Benjamin Neff
5f25135848 send public messages 2016-06-26 06:21:00 +02:00
Benjamin Neff
05bd61d4ff create Diaspora::Federation::Entities.build 2016-06-26 06:21:00 +02:00
Benjamin Neff
f53b5ffe6b create public and private dispatcher 2016-06-26 06:21:00 +02:00
Benjamin Neff
7184d4334e remove after_dispatch hook
handle photos in StatusMessageCreationService
2016-06-26 06:21:00 +02:00
Benjamin Neff
20dabbd15f remove user parameter from subscribers method 2016-06-26 06:21:00 +02:00
Benjamin Neff
f9f91a0e9e create new contact for local receive 2016-06-26 06:21:00 +02:00
Benjamin Neff
970e8bb3ec handle user services 2016-06-26 06:21:00 +02:00
Benjamin Neff
596659a78f first structure of Diaspora::Federation::Dispatcher 2016-06-26 06:21:00 +02:00
Benjamin Neff
83f5662d62 remove NotifyLocalUsers worker 2016-06-26 06:21:00 +02:00
Benjamin Neff
7bb172cefb remove old Private and Public Receiver 2016-06-26 06:21:00 +02:00
Benjamin Neff
102e2a0834 remove Request class and refactor Connecting 2016-06-26 06:20:59 +02:00
Benjamin Neff
6fbfc2bf96 write receive specs and delete old unused specs
also refactored receive methods
2016-06-26 06:20:59 +02:00
Benjamin Neff
59bb46eeb6 handle retractions 2016-06-26 06:20:59 +02:00
Benjamin Neff
58a5a881cf receive local
* Contact: auto-follow-back
* Shareable: create share visibilities
2016-06-26 06:20:59 +02:00
Benjamin Neff
ae96b4bf55 refactor message notifications
all visibilities are already in the conversation, so we can send
all notifications at once.
2016-06-26 06:20:59 +02:00
Benjamin Neff
b067c33779 handle photo updates 2016-06-26 06:20:59 +02:00
Benjamin Neff
d55be67df1 handle existing guids on receive 2016-06-26 06:20:59 +02:00
Benjamin Neff
f3466bcfd6 update profile 2016-06-26 06:20:59 +02:00
Benjamin Neff
4fb34139b0 cleanup notifications and fix tests 2016-06-26 06:20:59 +02:00
Benjamin Neff
97f4b0c2e4 handle ignored author on receive 2016-06-26 06:20:59 +02:00
Benjamin Neff
53e14dd2d6 add ReceiveLocal worker 2016-06-26 06:20:59 +02:00
Benjamin Neff
481431ea0a handle nested entities 2016-06-26 06:20:59 +02:00
Benjamin Neff
87666eeb35 handle receive contact 2016-06-26 06:20:59 +02:00
Benjamin Neff
e0da6708f4 save entities on receive
first implementation of receive_entity callback
2016-06-26 06:20:59 +02:00
Benjamin Neff
9021268e7a add related entity to relayables and retractions 2016-06-26 06:20:59 +02:00