import { getConversationParticipants, getTagValue } from "./index.js";
/** Returns the subject of a warpped direct message */
export function getWrappedMessageSubject(message) {
    return getTagValue(message, "subject");
}
/** Returns the parent id of a wrapped direct message */
export function getWrappedMessageParent(message) {
    return getTagValue(message, "e");
}
/** Returns the sender of a wrapped direct message */
export function getWrappedMesssageSender(message) {
    return message.pubkey;
}
/**
 * Returns the frist participant in a conversation that is not the sender
 * @see getConversationParticipants
 */
export function getWrappedMessageReceiver(message) {
    return getConversationParticipants(message).filter((p) => p !== message.pubkey)[0];
}
