|
|
|
@ -6,7 +6,10 @@ import {
|
|
|
|
|
declineConversationWithConfirm,
|
|
|
|
|
} from '../../interactions/conversationInteractions';
|
|
|
|
|
import { getConversationController } from '../../session/conversations';
|
|
|
|
|
import { hasSelectedConversationIncomingMessages } from '../../state/selectors/conversations';
|
|
|
|
|
import {
|
|
|
|
|
getSelectedHasMessages,
|
|
|
|
|
hasSelectedConversationIncomingMessages,
|
|
|
|
|
} from '../../state/selectors/conversations';
|
|
|
|
|
import { useSelectedConversationKey } from '../../state/selectors/selectedConversation';
|
|
|
|
|
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
|
|
|
|
|
import {
|
|
|
|
@ -78,9 +81,10 @@ const handleAcceptConversationRequest = async (convoId: string) => {
|
|
|
|
|
export const ConversationMessageRequestButtons = () => {
|
|
|
|
|
const selectedConvoId = useSelectedConversationKey();
|
|
|
|
|
|
|
|
|
|
const hasMessages = useSelector(getSelectedHasMessages);
|
|
|
|
|
const hasIncomingMessages = useSelector(hasSelectedConversationIncomingMessages);
|
|
|
|
|
const isIncomingRequest = useIsIncomingRequest(selectedConvoId);
|
|
|
|
|
const isOutgoingRequest = useIsOutgoingRequest(selectedConvoId);
|
|
|
|
|
const isOutgoingRequest = useIsOutgoingRequest(selectedConvoId, hasMessages);
|
|
|
|
|
|
|
|
|
|
if (!selectedConvoId || (!isIncomingRequest && !isOutgoingRequest)) {
|
|
|
|
|
return null;
|
|
|
|
|