mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-27 22:34:51 +00:00
description in business chats
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user