Call Disposition
This commit is contained in:
parent
9927b132b9
commit
e5638c0b20
20 changed files with 445 additions and 53 deletions
|
@ -256,6 +256,7 @@ const dataInterface: ServerInterface = {
|
|||
getConversationRangeCenteredOnMessage,
|
||||
getConversationMessageStats,
|
||||
getLastConversationMessage,
|
||||
getCallHistoryMessageByCallId,
|
||||
hasGroupCallHistoryMessage,
|
||||
migrateConversationMessages,
|
||||
|
||||
|
@ -3009,6 +3010,32 @@ async function getConversationRangeCenteredOnMessage({
|
|||
})();
|
||||
}
|
||||
|
||||
async function getCallHistoryMessageByCallId(
|
||||
conversationId: string,
|
||||
callId: string
|
||||
): Promise<string | void> {
|
||||
const db = getInstance();
|
||||
|
||||
const id: string | void = db
|
||||
.prepare<Query>(
|
||||
`
|
||||
SELECT id
|
||||
FROM messages
|
||||
WHERE conversationId = $conversationId
|
||||
AND type = 'call-history'
|
||||
AND callMode = 'Direct'
|
||||
AND callId = $callId
|
||||
`
|
||||
)
|
||||
.pluck()
|
||||
.get({
|
||||
conversationId,
|
||||
callId,
|
||||
});
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
async function hasGroupCallHistoryMessage(
|
||||
conversationId: string,
|
||||
eraId: string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue