Skip to content

Commit

Permalink
Merge branch 'master' into feature/channel-mark-as-read-tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya authored Jul 12, 2022
2 parents 6a84876 + d5f6075 commit b583364
Show file tree
Hide file tree
Showing 30 changed files with 474 additions and 257 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,10 @@ jobs:

- name: Run Dusk
run: ./bin/run_dusk.sh

# this only tests that the rollback functions are valid and doesn't check
# if they actually do what they're expected to do.
- name: Migration rollback test
run: |
php artisan migrate:reset | tee rollback.log
grep -Fq 'no rolling back from this migration =)' rollback.log
4 changes: 3 additions & 1 deletion Dockerfile.deployment
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ ARG APP_URL
ARG DOCS_URL
RUN yarn production

RUN php artisan scribe:generate

RUN rm -rf node_modules

ARG GIT_SHA
Expand All @@ -69,4 +71,4 @@ EXPOSE 8000
EXPOSE 8080

ENTRYPOINT ["/app/docker/deployment/entrypoint.sh"]
CMD ["php"]
CMD ["octane"]
5 changes: 3 additions & 2 deletions app/Http/Controllers/Chat/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ public function newConversation()
];
}

// TODO: I don't think anything actually calls this?
// TODO: move the listing to channels.index
/**
* @deprecated
* @group Undocumented
*/
public function presence()
Expand Down Expand Up @@ -286,7 +287,7 @@ public function updates()

// messages need presence
if ($includeMessages || $includePresence) {
$presence = $this->presence();
$presence = (new UserChannelList(auth()->user()))->get();
}

if ($includeMessages) {
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Chat/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ public function removeUser(User $user)
$userChannel->delete();
}

$this->resetMemoized();

(new ChatChannelEvent($this, $user, 'part'))->broadcast(true);

Datadog::increment('chat.channel.part', 1, ['type' => $this->type]);
Expand Down
3 changes: 0 additions & 3 deletions config/scribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,8 @@
\Knuckles\Scribe\Extracting\Strategies\BodyParameters\GetFromBodyParamTag::class,
],
'responses' => [
\Knuckles\Scribe\Extracting\Strategies\Responses\UseTransformerTags::class,
\Knuckles\Scribe\Extracting\Strategies\Responses\UseResponseTag::class,
\Knuckles\Scribe\Extracting\Strategies\Responses\UseResponseFileTag::class,
\Knuckles\Scribe\Extracting\Strategies\Responses\UseApiResourceTags::class,
\Knuckles\Scribe\Extracting\Strategies\Responses\ResponseCalls::class,
],
'responseFields' => [
\Knuckles\Scribe\Extracting\Strategies\ResponseFields\GetFromResponseFieldTag::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function up()
public function down()
{
Schema::table('beatmapset_events', function (Blueprint $table) {
$table->dropIndex('user_id');
$table->dropIndex(['user_id']);
});
}
}
2 changes: 1 addition & 1 deletion database/migrations/2020_05_15_083037_sync_structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,6 @@ public function up()
*/
public function down()
{
// no going back =)
throw new Exception('no rolling back from this migration =)');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function up()
*/
public function down()
{
Schema::table('user_account_history', function (Blueprint $table) {
Schema::table('osu_user_banhistory', function (Blueprint $table) {
$table->dropIndex(['timestamp']);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ public function up()
*/
public function down()
{
Schema::connection('mysql-store')('orders', function (Blueprint $table) {
Schema::connection('mysql-store')->table('orders', function (Blueprint $table) {
$table->dropColumn('provider');
$table->dropColumn('reference');
$table->dropIndex(['provider', 'reference']);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function down()
{
Schema::table('osu_beatmapsets', function (Blueprint $table) {
$table->dropColumn('track_id');
$table->dropIndex('track_id');
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddAllowPerformanceToOsuBuilds extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('osu_builds', function (Blueprint $table) {
$table->boolean('allow_performance')->default(false)->after('allow_bancho');
$table->index('allow_performance');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('osu_builds', function (Blueprint $table) {
$table->dropColumn('allow_performance');
});
}
}
42 changes: 36 additions & 6 deletions database/mods.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@
"RX",
"AP",
"SO",
"MG"
"MG",
"RP"
],
"RequiresConfiguration": false,
"UserPlayable": false,
Expand Down Expand Up @@ -487,7 +488,8 @@
"AT",
"CN",
"AP",
"MG"
"MG",
"RP"
],
"RequiresConfiguration": false,
"UserPlayable": true,
Expand All @@ -508,7 +510,8 @@
"CN",
"RX",
"SO",
"MG"
"MG",
"RP"
],
"RequiresConfiguration": false,
"UserPlayable": true,
Expand Down Expand Up @@ -540,7 +543,8 @@
"Settings": [],
"IncompatibleMods": [
"WG",
"MG"
"MG",
"RP"
],
"RequiresConfiguration": false,
"UserPlayable": true,
Expand All @@ -555,7 +559,8 @@
"Settings": [],
"IncompatibleMods": [
"TR",
"MG"
"MG",
"RP"
],
"RequiresConfiguration": false,
"UserPlayable": true,
Expand Down Expand Up @@ -819,7 +824,32 @@
"RX",
"AP",
"TR",
"WG"
"WG",
"RP"
],
"RequiresConfiguration": false,
"UserPlayable": true,
"ValidForMultiplayer": true,
"ValidForMultiplayerAsFreeMod": true
},
{
"Acronym": "RP",
"Name": "Repel",
"Description": "Hit objects run away!",
"Type": "Fun",
"Settings": [
{
"Name": "repulsion_strength",
"Type": "number"
}
],
"IncompatibleMods": [
"AT",
"CN",
"AP",
"TR",
"WG",
"MG"
],
"RequiresConfiguration": false,
"UserPlayable": true,
Expand Down
14 changes: 14 additions & 0 deletions docker/deployment/nginx-assets.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,24 @@ http {
listen 8080;
root /app/public;

expires 30d;

location ~ \.php$ {
access_log off;

return 404;
}

location = /docs/ {
expires off;
}

location = /docs/index.html {
expires off;
}

location /docs/ {
expires 7d;
}
}
}
11 changes: 0 additions & 11 deletions osu!web.sublime-project

This file was deleted.

Empty file removed public/.hhconfig
Empty file.
9 changes: 0 additions & 9 deletions public/browserconfig.xml

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed public/mstile-150x150.png
Binary file not shown.
4 changes: 2 additions & 2 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"src": "/images/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"src": "/images/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
Expand Down
3 changes: 3 additions & 0 deletions resources/views/docs/info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

## Breaking Changes

### 2022-07-06
- `chat/presence` endpoint has been deprecated, it will be removed in the near future.

### 2022-06-08
- `discussion_enabled` in Beatmapset(#beatmapset) is deprecated. All beatmapsets now have it enabled.

Expand Down
15 changes: 9 additions & 6 deletions resources/views/layout/metadata.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
See the LICENCE file in the repository root for full licence text.
--}}
<link rel="apple-touch-icon" sizes="180x180" href="{{ config('app.url') }}/apple-touch-icon.png">
<link rel="icon" sizes="32x32" href="{{ config('app.url') }}/favicon-32x32.png">
<link rel="icon" sizes="16x16" href="{{ config('app.url') }}/favicon-16x16.png">
<link rel="manifest" href="{{ config('app.url') }}/site.webmanifest">
<link rel="mask-icon" href="{{ config('app.url') }}/safari-pinned-tab.svg" color="#e2609a">
@php
$appUrl = config('app.url');
@endphp
<link rel="apple-touch-icon" sizes="180x180" href="{{ $appUrl }}/images/favicon/apple-touch-icon.png">
<link rel="icon" sizes="32x32" href="{{ $appUrl }}/images/favicon/favicon-32x32.png">
<link rel="icon" sizes="16x16" href="{{ $appUrl }}/images/favicon/favicon-16x16.png">
<link rel="manifest" href="{{ $appUrl }}/site.webmanifest">
<link rel="mask-icon" href="{{ $appUrl }}/images/favicon/safari-pinned-tab.svg" color="#e2609a">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="hsl({{ $currentHue }}, 10%, 40%)"> {{-- @osu-colour-b1 --}}

Expand Down Expand Up @@ -98,7 +101,7 @@
/^\/loaders\//i
],
release: {!! json_encode(config('osu.git-sha')) !!},
whitelistUrls: [/^{!! preg_quote(config('app.url'), '/') !!}\/.*\.js(?:\?.*)?$/],
whitelistUrls: [/^{!! preg_quote($appUrl, '/') !!}\/.*\.js(?:\?.*)?$/],
});
</script>
@endif
Expand Down
Loading

0 comments on commit b583364

Please sign in to comment.