mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
fix metadatabadges for closed group
do not show crown nor Mod badge
This commit is contained in:
parent
9645c210dd
commit
34e5648681
4 changed files with 10 additions and 6 deletions
|
@ -506,6 +506,7 @@ class MessageInner extends React.PureComponent<MessageRegularProps, State> {
|
|||
isAdmin,
|
||||
conversationType,
|
||||
direction,
|
||||
isPublic,
|
||||
onShowUserDetails,
|
||||
firstMessageOfSeries,
|
||||
} = this.props;
|
||||
|
@ -534,7 +535,7 @@ class MessageInner extends React.PureComponent<MessageRegularProps, State> {
|
|||
}}
|
||||
pubkey={authorPhoneNumber}
|
||||
/>
|
||||
{isAdmin && (
|
||||
{isPublic && isAdmin && (
|
||||
<div className="module-avatar__icon--crown-wrapper">
|
||||
<div className="module-avatar__icon--crown" />
|
||||
</div>
|
||||
|
|
|
@ -53,7 +53,7 @@ export const MetadataBadges = (props: BadgesProps): JSX.Element => {
|
|||
const { id, direction, isPublic, isAdmin, withImageNoCaption } = props;
|
||||
const badges = [
|
||||
(isPublic && 'Public') || null,
|
||||
(isAdmin && 'Mod') || null,
|
||||
(isPublic && isAdmin && 'Mod') || null,
|
||||
].filter(nonNullish);
|
||||
|
||||
if (!badges || badges.length === 0) {
|
||||
|
|
|
@ -626,9 +626,12 @@ export async function handleMessageEvent(event: MessageEvent): Promise<void> {
|
|||
|
||||
// the conversation with the primary device of that source (can be the same as conversationOrigin)
|
||||
|
||||
const conversation = ConversationController.getInstance().getOrThrow(
|
||||
conversationId
|
||||
);
|
||||
const conversation = ConversationController.getInstance().get(conversationId);
|
||||
|
||||
if (!conversation) {
|
||||
window.log.warn('Skipping handleJob for unknown convo: ', conversationId);
|
||||
return;
|
||||
}
|
||||
|
||||
conversation.queueJob(async () => {
|
||||
await handleMessageJob(
|
||||
|
|
|
@ -298,7 +298,7 @@ export async function handlePublicMessage({ message: outerMessage }: any) {
|
|||
const ev = {
|
||||
// Public chat messages from ourselves should be outgoing
|
||||
type: isOurDevice ? 'sent' : 'message',
|
||||
data: outerMessage,
|
||||
data: messageData,
|
||||
confirm: () => {
|
||||
/* do nothing */
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue