File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ export const BanOrUnBanUserDialog = (props: {
77
77
78
78
const displayName = useConversationUsername ( pubkey ) ;
79
79
80
+ const hasPubkeyOnLoad = pubkey ?. length ;
81
+
80
82
const inputTextToDisplay =
81
83
! ! pubkey && displayName ? `${ displayName } ${ PubKey . shorten ( pubkey ) } ` : undefined ;
82
84
@@ -129,7 +131,14 @@ export const BanOrUnBanUserDialog = (props: {
129
131
disabled = { inProgress }
130
132
dataTestId = { isBan ? 'ban-user-confirm-button' : 'unban-user-confirm-button' }
131
133
/>
132
- { isBan ? (
134
+ { /*
135
+ * Note: we can only ban-and-delete-all when we have a pubkey on load currently.
136
+ * The reason is that there is an issue (sogs side), and the server won't lookup a blindedId from a
137
+ * sessionID, for the delete_all endpoint specifically.
138
+ * When hasPubkeyOnLoad is true, the dialog was shown from a right click on the messages list,
139
+ * so we do have the blindedId already in this case.
140
+ */ }
141
+ { isBan && hasPubkeyOnLoad ? (
133
142
< SessionButton
134
143
buttonType = { SessionButtonType . Simple }
135
144
buttonColor = { SessionButtonColor . Danger }
You can’t perform that action at this time.
0 commit comments