core: only skip creating agent user when app is first started

This commit is contained in:
Evgeny Poberezkin
2024-01-06 11:24:01 +00:00
parent 64230f3545
commit 96a1d92017
7 changed files with 134 additions and 91 deletions
+3 -1
View File
@@ -1777,7 +1777,7 @@ viewChatError logLevel testView = \case
CEUserNotHidden _ -> ["user is not hidden"]
CEInvalidDisplayName {displayName, validName} ->
map plain $
["invalid display name: " <> viewName displayName]
[if T.null displayName then "display name can't be empty" else "invalid display name: " <> viewName displayName]
<> ["you could use this one: " <> viewName validName | not (T.null validName)]
CEChatNotStarted -> ["error: chat not started"]
CEChatNotStopped -> ["error: chat not stopped"]
@@ -1889,6 +1889,8 @@ viewChatError logLevel testView = \case
AGENT A_DUPLICATE -> [withConnEntity <> "error: AGENT A_DUPLICATE" | logLevel == CLLDebug]
AGENT A_PROHIBITED -> [withConnEntity <> "error: AGENT A_PROHIBITED" | logLevel <= CLLWarning]
CONN NOT_FOUND -> [withConnEntity <> "error: CONN NOT_FOUND" | logLevel <= CLLWarning]
CRITICAL restart e -> [plain $ "critical error: " <> e] <> ["please restart the app" | restart]
INTERNAL e -> [plain $ "internal error: " <> e]
e -> [withConnEntity <> "smp agent error: " <> sShow e | logLevel <= CLLWarning]
where
withConnEntity = case entity_ of