import { DisplayMessage } from '@/store/messagesStore'

export function getMasterIdFromDisplayMsg(msg: DisplayMessage) {
  if (!msg.state) {
    return msg.target as string
  } else {
    return msg.from as string
  }
}

export function getTargetIdFromDisplayMsg(msg: DisplayMessage) {
  if (!msg.state) {
    return msg.from as string
  } else {
    return msg.target as string
  }
}
