Merge branch 'frontend_community_message_keep_open' of github.com:gradido/gradido into frontend_community_message_keep_open

This commit is contained in:
einhornimmond 2025-05-15 13:29:58 +02:00
commit 720283d8fe
4 changed files with 12 additions and 4 deletions

View File

@ -49,7 +49,11 @@ export async function syncUser(
if (!isValid(postUser, user.id)) {
return ExecutedHumhubAction.VALIDATION_ERROR
}
const humhubUser = humhubUsers.get(postUser.account.username)
let humhubUser = humhubUsers.get(postUser.account.username)
if (!humhubUser) {
// fallback for legacy users
humhubUser = humhubUsers.get(user.gradidoID)
}
const humHubClient = HumHubClient.getInstance()
if (!humHubClient) {
throw new LogError('Error creating humhub client')

View File

@ -4,7 +4,9 @@ import { HumHubClient } from '@/apis/humhub/HumHubClient'
import { GetUser } from '@/apis/humhub/model/GetUser'
import { PostUser } from '@/apis/humhub/model/PostUser'
import { ExecutedHumhubAction, syncUser } from '@/apis/humhub/syncUser'
import { PublishNameLogic } from '@/data/PublishName.logic'
import { UpdateUserInfosArgs } from '@/graphql/arg/UpdateUserInfosArgs'
import { PublishNameType } from '@/graphql/enum/PublishNameType'
import { backendLogger as logger } from '@/server/logger'
/**
@ -44,7 +46,9 @@ export async function syncHumhub(
}
const humhubUsers = new Map<string, GetUser>()
if (humhubUser) {
humhubUsers.set(humhubUser.account.username, humhubUser)
const publishNameLogic = new PublishNameLogic(user)
const username = publishNameLogic.getUserIdentifier(user.humhubPublishName as PublishNameType)
humhubUsers.set(username, humhubUser)
}
logger.debug('update user at humhub')
const result = await syncUser(user, humhubUsers)

View File

@ -414,7 +414,7 @@
"first": "Vorname",
"first-tooltip": "Nur der Vornamen",
"first-initial": "Vorname und Initial",
"first-initial-tooltip": "Vornamen plus die ersten beiden Anfangsbuchstabe des Nachnamens",
"first-initial-tooltip": "Vornamen plus den ersten Anfangsbuchstaben des Nachnamens",
"initials": "Initialen",
"initials-tooltip": "Initialen von Vor- und Nachname also jeweils die ersten zwei Buchstaben unabhängig von der Existenz des Benutzernamens",
"name-full": "Vorname und Nachname",

View File

@ -414,7 +414,7 @@
"first": "Firstname",
"first-tooltip": "the first name only",
"first-initial": "First name and initial",
"first-initial-tooltip": "first name plus the first two initial letters of the last name",
"first-initial-tooltip": "first name plus the first letter of the last name",
"initials": "Initials",
"initials-tooltip": "Initials of first name and last name, i.e. the first two letters of each regardless of the existence of the user name",
"name-full": "first name and last name",