Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web SDK release v1.6.5 #161

Merged
merged 8 commits into from
Aug 24, 2023
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.6.5] - 24 Aug, 2023
- Fixes a bug related to sequence of message in Web Inbox
- Adds the parameter for location.protocol in page request

## [1.6.4] - 27 Jul, 2023
- Fixes a bug related to updating the WZRK_G on onUserLogin.
- Updated WZRK_G cookie expiry to 1 year.
Expand Down
46 changes: 32 additions & 14 deletions clevertap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clevertap.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clevertap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clevertap-web-sdk",
"version": "1.6.4",
"version": "1.6.5",
"description": "",
"main": "clevertap.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/clevertap.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,9 @@ export default class CleverTap {
if (parseInt(data.pg) === 1) {
this.#overrideDSyncFlag(data)
}
data.af = { lib: 'web-sdk-v$$PACKAGE_VERSION$$' }
let proto = document.location.protocol
proto = proto.replace(':', '')
data.af = { lib: 'web-sdk-v$$PACKAGE_VERSION$$', protocol: proto }
pageLoadUrl = addToURL(pageLoadUrl, 'type', 'page')
pageLoadUrl = addToURL(pageLoadUrl, 'd', compressData(JSON.stringify(data), this.#logger))

Expand Down
3 changes: 2 additions & 1 deletion src/modules/web-inbox/WebInbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ export class Inbox extends HTMLElement {
const maxMsgsInInbox = this.config.maxMsgsInInbox ?? MAX_INBOX_MSG
const firstChild = this.inboxCard.firstChild

for (const m in messages) {
const sortedMsgs = Object.values(messages).sort((a, b) => b.date - a.date).map((m) => m.id)
for (const m of sortedMsgs) {
const item = new Message(this.config, messages[m])
item.setAttribute('id', messages[m].id)
item.setAttribute('pivot', messages[m].wzrk_pivot)
Expand Down
Loading