From 6a2b3230069aeb3918c35e542c0fb607345b7a79 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 22 Jul 2019 22:52:28 -0500 Subject: [PATCH] fix username matching --- app/helpers/autoreject_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/autoreject_helper.rb b/app/helpers/autoreject_helper.rb index 57f58cd65..7b9371280 100644 --- a/app/helpers/autoreject_helper.rb +++ b/app/helpers/autoreject_helper.rb @@ -28,7 +28,7 @@ module AutorejectHelper username = @json['preferredUsername'] || @json['username'] if username && username.is_a?(String) username = (@json['actor'] && @json['actor'].is_a?(String)) ? @json['actor'] : '' - username = username.scan(/(?<=\/users?\/|@\/)([^\s\/]+)/).first + username = username.scan(/(?<=\/user\/|\/@|\/users\/)([^\s\/]+)/).first end unless username.blank?