From 7f880e3ab041584f77daf098e585bc3c4a08a38a Mon Sep 17 00:00:00 2001 From: hellekin Date: Tue, 2 Feb 2021 23:18:27 +0100 Subject: [FIX] Account for users without an avatar or group 1. Ensure new users belong to an Agent Users may come without the correct group information, leading to a situation where they have no Agent assigned to them. The application cannot handle this, so we ensure new users are at least associated to the new Anonymous Agent. 2. Introduce a default avatar Users coming without an avatar would see a broken view. Now they're assigned a default avatar, which shows the IN COMMON icon logo instead. --- app/helpers/users_helper.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/helpers/users_helper.rb') diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 0adb3be..1520238 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -3,4 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later module UsersHelper + def default_user_avatar_url + "https://talk.incommon.cc/uploads/talk_incommon_cc/optimized/1X/ae4533e882f427b1ae870080a42978c67c6437cc_2_32x32.png" + end end -- cgit v1.2.3