dreammall-earth / dreammall.earth

Dreammall.earth website & product page
https://dreammall-earth.github.io/dreammall.earth/
Apache License 2.0
7 stars 2 forks source link

🚀 [Feature] Frontend: List missed and history of received calls #2474

Open ulfgebhardt opened 3 weeks ago

ulfgebhardt commented 3 weeks ago

🚀 Feature

Frontend: List missed and history of received calls Keyword for Hardi: Bell

image

image

Mogge commented 1 day ago

Here is how to connect to the backend to read or update the history of incoming calls:

  query {
    incomingMallTalkHistory {
      id
      status
      from {
        username
      }
    }
  }

Where status is an enumerator:

export enum MallTalkStatus {
  'UNKNOWN' = 'UNKNOWN',
  'ACCEPTED' = 'ACCEPTED',
  'REJECTED' = 'REJECTED',
  'MISSED' = 'MISSED',
}

When this query is called, all mall talks with status UNKNOWN are set to MISSED. Therefore the status UNKNOWN should never reach the client.

To update the status:

mutation($tableId: Int!, $fromId: Int!, $status: MallTalkStatus!) {
  updateMallTalkHistoryStatus(tableId: $tableId, fromId: $fromId, status: $status) {
    id
    status
    from {
      username
    }
  }
}

This should be done, when the user clicks on accept or reject on an incoming call.