Skip to content

v0.1.2

Latest

Choose a tag to compare

@nedimf nedimf released this 04 Jun 10:01
· 3 commits to main since this release

Adding support for attachments in reply thread

useSupport
Submit support tickets and reply to existing support threads.

import { useSupport } from '@appgram/react-native'

const { submitTicket, submitMessage, isSubmitting, isSubmittingMessage, error, successMessage } = useSupport()

const attachment = {
  uri: 'file:///path/to/screenshot.png',
  name: 'screenshot.png',
  type: 'image/png',
  size: 102400,
}

await submitTicket({
  subject: 'Help needed',
  description: 'I have a question...',
  user_email: 'user@example.com',
  user_name: 'John',
  attachments: [attachment],
})

await submitMessage('ticket-id', 'magic-link-token', {
  content: 'Here is the screenshot from the thread.',
  attachments: [attachment],
})