description in business chats

This commit is contained in:
Evgeny @ SimpleX Chat
2026-07-14 21:43:33 +00:00
parent 78de359db1
commit 48b7523827
3 changed files with 6 additions and 4 deletions
@@ -1522,6 +1522,7 @@ sealed class ChatInfo: SomeChat, NamedChat {
override val displayName get() = groupInfo.displayName
override val fullName get() = groupInfo.fullName
override val shortDescr get() = groupInfo.groupProfile.shortDescr
override val profileDescription get() = groupInfo.profileDescription
override val image get() = groupInfo.image
override val localAlias get() = groupInfo.localAlias
@@ -2236,6 +2237,7 @@ data class GroupInfo (
override val displayName get() = localAlias.ifEmpty { groupProfile.displayName }
override val fullName get() = groupProfile.fullName
override val shortDescr get() = groupProfile.shortDescr
override val profileDescription get() = if (businessChat != null) groupProfile.description else null
override val image get() = groupProfile.image
val isOwner: Boolean
+2 -2
View File
@@ -1117,8 +1117,8 @@ rejectRelayInvitationAsync user uclId cxt groupRelayInv invId reqChatVRange init
agentAcceptContactAsync cmdId acId False invId msg PQSupportOff chatV subMode
businessGroupProfile :: Profile -> GroupPreferences -> GroupProfile
businessGroupProfile Profile {displayName, fullName, shortDescr, image} groupPreferences =
GroupProfile {displayName, fullName, description = Nothing, shortDescr, image, publicGroup = Nothing, groupPreferences = Just groupPreferences, memberAdmission = Nothing}
businessGroupProfile Profile {displayName, fullName, shortDescr, description, image} groupPreferences =
GroupProfile {displayName, fullName, description, shortDescr, image, publicGroup = Nothing, groupPreferences = Just groupPreferences, memberAdmission = Nothing}
introduceToModerators :: StoreCxt -> User -> GroupInfo -> GroupMember -> CM ()
introduceToModerators cxt user gInfo@GroupInfo {groupId} m@GroupMember {memberRole, memberId} = do
+2 -2
View File
@@ -2786,10 +2786,10 @@ updateGroupPreferences db User {userId} g@GroupInfo {groupId, groupProfile = p}
pure (g :: GroupInfo) {groupProfile = p {groupPreferences = Just ps}, fullGroupPreferences = mergeGroupPreferences $ Just ps}
updateGroupProfileFromMember :: DB.Connection -> User -> GroupInfo -> Profile -> ExceptT StoreError IO GroupInfo
updateGroupProfileFromMember db user g@GroupInfo {groupId} Profile {displayName = n, fullName = fn, shortDescr = sd, image = img} = do
updateGroupProfileFromMember db user g@GroupInfo {groupId} Profile {displayName = n, fullName = fn, shortDescr = sd, description = descr, image = img} = do
p <- getGroupProfile -- to avoid any race conditions with UI
let g' = g {groupProfile = p} :: GroupInfo
p' = p {displayName = n, fullName = fn, shortDescr = sd, image = img} :: GroupProfile
p' = p {displayName = n, fullName = fn, shortDescr = sd, description = descr, image = img} :: GroupProfile
updateGroupProfile db user g' p'
where
getGroupProfile =