Commit Graph

2127 Commits

Author SHA1 Message Date
Developer
bf1d00b5f8 Added new follow limit for unconfirmed accounts to 10
• Added:
- new follow limit for unconfirmed accounts to 10
2021-02-18 23:18:16 -05:00
Developer
c18bcf2b21 Added check to RegistrationsController for checking if form was submitted too quickly
• Added:
- check to RegistrationsController for checking if form was submitted too quickly
2021-02-18 21:35:09 -05:00
Developer
5149c613f2 Added StatusSimilarityService to check against spamming same statuses over and over
• Added:
- StatusSimilarityService to check against spamming same statuses over and over
- StatusSimilarityService check to PostStatusService and EditStatusService
2021-02-18 20:12:40 -05:00
Developer
a955c51eb6 Added similar_text gem
• Added:
- similar_text gem
2021-02-18 20:11:39 -05:00
Developer
00e6d799e8 Fixed AddIsFlaggedAsSpamToAccounts migration down removal value 2021-02-18 23:21:09 +00:00
Developer
bec3360b66 Added checks in ModalBase, PopoverBase if page goes back/forward to dismiss
• Added:
- checks in ModalBase, PopoverBase if page goes back/forward (popstate) to dismiss the modal, popover
2021-02-18 17:22:11 -05:00
Developer
7000902ecb Added check for if node exists before handleKeyDown on PopoverBase
• Added:
- check for if node exists before handleKeyDown on PopoverBase
2021-02-18 17:21:02 -05:00
Developer
c85ad3e92a Updated account_flags_block to only be visible for staff
• Updated:
- account_flags_block to only be visible for staff
2021-02-18 17:01:25 -05:00
Fosco Marotto
fea1b9389b Add a writing role to the shortcuts controller 2021-02-18 16:57:34 -05:00
Developer
be5fc25544 Added missing account flags in admin group moderator list
• Added:
- missing account flags in admin group moderator list
2021-02-18 16:50:17 -05:00
Developer
fa74c34095 Added account_flags_block partial to admin pages
• Added:
- account_flags_block partial to admin pages (groups, accounts, reports) so admin/moderators can easily see pro, verified, investor, donor, spam flags of an account
2021-02-18 16:49:14 -05:00
Developer
c7df309df5 Added total report count to admin reports page
• Added:
- total report count to admin reports page
2021-02-18 16:44:49 -05:00
Developer
84ba247982 Added (temporary) fix for spam bots statuses to be hidden from timelines, comments
• Added:
- (temporary) fix for spam bots statuses to be hidden from timelines, comments

• Todo:
- Implement a new "spam" structure to allow for accounts to be safe from being (re) marked as spam.
2021-02-18 16:25:07 -05:00
Developer
e8f50b7ad5 Added check in Comment to see if data exists before rendering
• Added:
- check in Comment to see if data exists before rendering
2021-02-18 16:24:06 -05:00
Fosco Marotto
4696307cc9 Use a writing role for some sidekiq worker reads 2021-02-18 15:02:16 -05:00
Developer
de7d71e0ee Updated SignUpLogInPanel login/signup buttons to match nav and injection auth buttons
• Updated:
- SignUpLogInPanel login/signup buttons to match nav and injection auth buttons
2021-02-18 13:41:37 -05:00
Developer
6421b632b0 Updated LoggedOutNavigationBar log in button background color
• Updated:
- LoggedOutNavigationBar log in button background color to match themes
2021-02-18 13:39:16 -05:00
Developer
65949c7e71 Removed ImageProxyController API route
• Removed:
- ImageProxyController API route
- removed from news reducer for trends.

• Todo:
- Devise solution for integrating cross site images from trends -> social
2021-02-18 13:34:08 -05:00
Free Speech Forever
559ccc7e51 Merge branch 'performance_boosts' into 'develop'
Performance boosts

See merge request gab/social/gab-social!64
2021-02-18 07:09:28 +00:00
rubic0n
44fd00bdc0 Remove an unnecessary if 2021-02-18 00:54:51 -06:00
rubic0n
9b17b0a553 Reduce array allocations by using a constant 2021-02-18 00:54:29 -06:00
rubic0n
b1445d09b6 Remove 40KB of allocations (4,100 objects) from home feed
(When using dummy data)

* to_s(16) allocates a string per character
  Instead of converting the ord to hex and determining if the hex
  is over 2 characters long, just see if the ord is over 255.
* .match allocates a MatchData instance and sets all sorts of backrefs
  ($1, $2, etc). match? just returns a boolean.
2021-02-18 00:45:21 -06:00
rubic0n
006322cff7 Remove Hash allocation
merge! takes a Hash as an argument. Rather than allocating a Hash,
just use two different `=` calls, to achieve the same result.
2021-02-18 00:35:31 -06:00
rubic0n
a623252c59 Convert to boolean in C code
casecmp?(str) is 1.5x faster than casecmp(str).zero?
It's 1 less method call in Ruby, and the C code can convert
to boolean, rather than returning a number and determining
if it's zero.
2021-02-17 23:25:10 -06:00
rubic0n
0c7019f1e8 Add Benchmark IPS gem, to A/B test code 2021-02-17 23:24:34 -06:00
Fosco Marotto
6b7ece9123 Add a nil check during require_user 2021-02-17 00:20:06 -05:00
Fosco Marotto
8d3d7efe34 Merge branch 'develop' of https://code.gab.com/gab/social/gab-social into develop 2021-02-16 16:04:25 -05:00
Fosco Marotto
9666472105 Wrap user confirm method with writing role 2021-02-16 16:04:11 -05:00
Fosco Marotto
88d8bd2816 Merge remote-tracking branch 'origin/load_rails_6_0_defaults' into develop 2021-02-16 15:10:01 -05:00
Free Speech Forever
cb6e06c285 Merge branch 'feature/remove_keypair' into 'develop'
removed rsa keypair from account table, it was a federation relic

See merge request gab/social/gab-social!63
2021-02-16 18:54:37 +00:00
admin
5793d2aa33 remove local monkeypatch 2021-02-16 13:43:09 -05:00
admin
69f3cf08c9 fixed app/controllers/concerns/signature_verification.rb 2021-02-16 13:41:49 -05:00
admin
5d9750fa25 forgot to push these changes 2021-02-16 13:35:19 -05:00
admin
e942d3d97c removed rsa keypair from account table, it was a federation relic 2021-02-15 21:49:50 -05:00
mgabdev
5d1a40d936 Added CharacterCounter to ComposeDestinationHeader
• Added:
- CharacterCounter to ComposeDestinationHeader
- Styles for stroke colors for CharacterCounter

• Updated:
- CharacterCounter styles, heights to fit in header
2021-02-15 21:47:56 -05:00
mgabdev
0456ccfb2a Added missing fillSecondary class
• Added:
- missing fillSecondary class
2021-02-15 21:00:43 -05:00
mgabdev
0edaaa95d7 Fixed issue with Following/Followers scrolling to top on infinite scroll pagination
• Fixed:
- issue with Following/Followers scrolling to top on infinite scroll pagination
2021-02-15 20:48:19 -05:00
Fosco Marotto
d91df58eb9 Remove stray } from api.js 2021-02-15 19:59:02 -05:00
Free Speech Forever
422a599831 Merge branch 'test/devise-fork' into 'develop'
Use a modified Devise gem, changes to writing roles

See merge request gab/social/gab-social!62
2021-02-15 23:26:00 +00:00
Free Speech Forever
92c9092abd Avoid redundant OAuth queries when not signed in
If you aren't signed in, you don't have an auth token.
When you don't have an auth token, React was sending the headers

"Authorization: Bearer null"

This caused 5 Doorkeeper token lookups using
WHERE "oauth_access_tokens"."token" = 'null'
on the Explore page (the root of the app when not signed in).
2021-02-15 23:26:00 +00:00
Fosco Marotto
7bfe6c7709 More writing role changes in sessions controller 2021-02-14 23:21:53 -05:00
Fosco Marotto
5e7cec5345 Change logout deletion method. 2021-02-14 21:26:48 -05:00
Free Speech Forever
dd8c656dd5 Merge branch 'puma_5_2' into 'develop'
Upgrade to Puma 5.2.0 (from 5.1.1)

See merge request gab/social/gab-social!54
2021-02-15 01:12:32 +00:00
Free Speech Forever
2b563148a8 Merge branch 'development_updates' into 'develop'
Development updates

See merge request gab/social/gab-social!61
2021-02-15 01:11:39 +00:00
Fosco Marotto
0f85ba2f12 Change the oauth authorizations controller writing role method. 2021-02-14 15:52:38 -05:00
Fosco Marotto
0d5acfc3fb Update push subscription writing role 2021-02-14 14:10:25 -05:00
Fosco Marotto
09ba5c9be8 Fix settings application controller writing role 2021-02-14 14:05:03 -05:00
rubic0n
73c0e50936 Prevent constant ElasticAPM warnings in development by disabling it
No changes are needed in prod, since the `enabled` setting defaults
to "true", and prod obviously isn't setting this ENV.
2021-02-13 23:20:43 -06:00
rubic0n
f472a6154e Mark the replicas as replicas
Rails won't even attempt to write to a replica. Without this option,
a write attempt would actually run against Postgres, and it would
be up to Postgres to throw a readonly error.

Additionally, marking it as a replica teaches ActiveRecord that it
should not attempt to run migrations against this connection.

https://api.rubyonrails.org/classes/ActiveRecord/DatabaseConfigurations.html#method-i-configs_for

I'm actually pretty sure that the lack of `replica: true`
is why there's currently a db/slave1_schema.rb and db/slave2_schema.rb
2021-02-13 23:20:43 -06:00
rubic0n
903b6c7969 Simplify database.yml by merging in default options
Anything in the &default section can be merged in using <<: *default
In this case, the default already specifies that the adapter is
postgresql, the timeout is 5000, the encoding is unicode. It also
already specified the db pool, but the default actually checked 2
different ENVs and provided a fallback if it's not provided.
Lastly, I was able to move the prepared_statements section to the
defaults, because the .env.vagrant file doesn't specify
ENV['PREPARED_STATEMENTS'], development still just sets it to
'false'.
2021-02-13 23:20:43 -06:00