Skip to content

Commit 0129836

Browse files
committed
feat: Support SMS attachments sync to call log
1 parent 48cd461 commit 0129836

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pipedrive-embeddable-ringcentral-phone-spa",
3-
"version": "2.8.1",
3+
"version": "2.8.3",
44
"description": "Add RingCentral Embeddable Voice widgets to Pipedrive",
55
"keywords": [
66
"RingCentral",

src/features/call-log-sync.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,15 @@ function buildMsgs (body) {
161161
? m.to
162162
: [m.from]
163163
n = n.map(m => formatPhoneLocal(m.phoneNumber)).join(', ')
164+
let attachments = (m.attachments || [])
165+
.filter(d => d.type !== 'Text')
166+
.map(d => {
167+
const url = encodeURIComponent(d.uri)
168+
return `<p><a href="https://ringcentral.github.io/ringcentral-media-reader/?media=${url}">attachment: ${d.fileName || d.id}</a><p>`
169+
}).join('')
170+
attachments = attachments ? `<p>attachments: </p>${attachments}` : ''
164171
arr.push({
165-
body: `<p>SMS: <b>${m.subject}</b> - ${desc} <b>${n}</b> - ${moment(m.creationTime).format('MMM DD, YYYY HH:mm')}</p>`,
172+
body: `<div>SMS: <b>${m.subject}</b> - ${desc} <b>${n}</b> - ${moment(m.creationTime).format('MMM DD, YYYY HH:mm')}${attachments}</div>`,
166173
id: m.id
167174
})
168175
}

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Ringcentral Embeddable Widgets for Pipedrive",
3-
"version": "2.8.1",
3+
"version": "2.8.3",
44
"description": "Add RingCentral Embeddable Voice widgets to Pipedrive",
55
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1YqYvCEeGGNOgtKrx8DfG33ujx7NgAwbyVpikug4mHiNvKZYWulw7lY5fjaD8wAy5bmXnkfULDzqMkL8UOxUcf8qD2lJFcLm+BqBtqNnoSz00vwjSOxXrcDvpvsMrjEZkI7N/FD60sTWp1U+QOehua7OboUpXb4iV7TQfppz3PsCz7qGOa4PWjUMAZTTgomUtW47Es6f/vjIeejs7Ihro3Al5Jo3SWIbjpjSU9BK34XgFvtcZx3lZQgfFiK+ZNyxlx8mgC/PLqJB+uX63ywMrT86TdcfxBuaThy98S8SCXjZTpHOP6X5pmGMk0lPM06hwxmSCBZgHOHL/Wk6r8FUlQIDAQAB",
66
"permissions": [

0 commit comments

Comments
 (0)