Skip to content

Releases: qiscus/qiscus-sdk-web-core

Qiscus Chat SDK for Javascript

04 Aug 04:47
Compare
Choose a tag to compare

add functionality to close mqtt / realtime connection when needed

  • openRealtimeConnection(): Promise<boolean>
    re-open realtime connection after closing it
  • closeRealtimeConnection(): Promise<boolean>
    close realtime connection without affecting sync interval

On normal occurence, sync interval will be changed to 5 seconds from 30 seconds when realtime connection are closed
but if closeRealtimeConnection() are called, it will still on 30 seconds interval

Qiscus Chat SDK for Javascript

06 Apr 05:12
Compare
Choose a tag to compare
  • add more parameter to getFileList method
    • includeExtensions: string[] to search a specified extension when getting file list
    • excludeExtensions: string[] to exclude a specified extension when getting file list
    • userId: string to search only file sent by specified userId

Qiscus Chat SDK for Javascript

24 Mar 05:32
Compare
Choose a tag to compare
  • Fix spawning multiple mqtt instance, when disconnected from mqtt broker

Qiscus Chat SDK for Javascript

09 Mar 07:05
Compare
Choose a tag to compare
  • Add functionality to not set sender property when requesting file list with method getFileList

For example:

getFileList({ roomIds: [123], sender: null })

Will call ajax with payload:
{ roomIds: [123] }

While if you omit sender parameter, it will default to the previous behaviors which is using currently
authenticated user id as sender

getFileList({ roomIds: [123] })

will call ajax with payload:
{ roomIds: [123], sender: 'guest-101' } if currently authenticated user id are guest-101

Qiscus Chat SDK Javascript Core v2.10.10

08 Feb 08:38
Compare
Choose a tag to compare

Changes:

  • improve html escaping when sending message

Qiscus Chat SDK Javascript Core v3.1.2

28 Jan 10:00
Compare
Choose a tag to compare

Changes:
Add feature for editing message

updateMessage(message: model.IQMessage, callback?: (err: Error) => void): void
onMessageUpdated(handler: (message: model.IQMessage) => void): () => void

For example:

const message = {
  uniqueId: 'your-message-unique-id'
  text: 'hi'
  extras: {}
  payload: {}
}
qiscus.updateMessage(message, function (message, error) {
  if (error != null) {
    console.log('error:', error)
    return
  }
  console.log(message)
})

// And for listening on event when another user updating their message:
qiscus.onMessageUpdated(function (message) {
  console.log(message);
})

Please note that this feature is only activated / available for selected client only, contact our support for more information.

Qiscus Chat SDK Javascript Core v2.10.9

28 Jan 09:40
Compare
Choose a tag to compare

Changes:
Add feature for editing message

await qiscus.updateMessage(messageObj)

// or
await qiscus.updateMessage({
  unique_id: 'your-message-unique-id',
  message: 'message text',
  extras: {},
  payload: {},
})

And for listening on event when another user updating their message:

qiscus.onMessageUpdated(function (message) {
  console.log(message);
})

// or if you prefer configure event listening while initializing qiscus chat sdk
qiscus.init({
  options: {
    messageUpdatedCallback: function (message) {
      console.log(message);
    }
  }
})

Please note that this feature is only activated / available for selected client only, contact our support for more information.

Qiscus Chat SDK Javascript Core v2.10.6

23 Nov 04:35
Compare
Choose a tag to compare

Changes:

  • add room_type params for qiscus.loadRoomList method, valid value are: single, group, or undefined.

for example:

  • qiscus.loadRoomList({ room_type: 'single' })
  • qiscus.loadRoomList({ room_type: 'group' })
  • qiscus.loadRoomList() default to return all room type

Qiscus Chat SDK Javascript Core v3.1.0

22 Oct 10:16
Compare
Choose a tag to compare

Changes:

  • add clientId on mqtt connection
  • add migration guide
  • add searchMessage method
type Params = {
  query: string
  roomIds: number[]
  userId?: string
  type?: string
  roomType?: string
  page?: number
  limit?: number
  callback?: (messages?: model.IQMessage[], error?: Error) => void
}

function searchMessage ({ query, roomIds = [], userId, type, roomType, page, limit, callback }: Params): void | Promise<model.IQMessage[]>
  • add getFileList method
type Params = {
  roomIds?: number[]
  fileType?: string
  page?: number
  limit?: number
  callback?: (messages?: model.IQMessage[], error?: Error) => void
}

function getFileList ({ roomIds = [], fileType, page, limit, callback, }: Params): void | Promise<model.IQMessage[]> 
  • add getRoomUnreadCount method
getRoomUnreadCount(callback?: IQCallback2<number>): void | Promise<number> 

Qiscus Chat SDK Javascript Core 2.10.4

22 Oct 10:11
Compare
Choose a tag to compare

Changes:

  • fix can not get list of file getFileList