podchat 12.6.9-snapshot.1 → 12.6.9-snapshot.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/buildConfig.json +1 -1
- package/dist/node/chat.js +48 -0
- package/dist/node/lib/constants.js +1 -0
- package/package.json +1 -1
- package/src/buildConfig.json +1 -1
- package/src/chat.js +51 -0
- package/src/lib/constants.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"12.6.9-snapshot.
|
|
1
|
+
{"version":"12.6.9-snapshot.1","date":"۱۴۰۵/۴/۲۸","VersionInfo":"Release: false, Snapshot: true, Is For Test: true"}
|
package/dist/node/chat.js
CHANGED
|
@@ -2088,6 +2088,40 @@ function Chat(params) {
|
|
|
2088
2088
|
});
|
|
2089
2089
|
break;
|
|
2090
2090
|
|
|
2091
|
+
/**
|
|
2092
|
+
* Type 102 Close Thread
|
|
2093
|
+
*/
|
|
2094
|
+
case _constants.chatMessageVOTypes.CLOSE_THREAD:
|
|
2095
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
2096
|
+
app.store.messagesCallbacks[uniqueId](_utility["default"].createReturnData(chatMessage.typeCode, chatMessage.ownerId, false, '', 0, messageContent));
|
|
2097
|
+
}
|
|
2098
|
+
if (app.sdkParams.fullResponseObject) {
|
|
2099
|
+
app.threadMethods.getThreads({
|
|
2100
|
+
threadIds: [threadId],
|
|
2101
|
+
typeCode: typeCode
|
|
2102
|
+
}, function (threadsResult) {
|
|
2103
|
+
var thread = threadsResult.result.threads[0];
|
|
2104
|
+
// thread.mute = true;
|
|
2105
|
+
|
|
2106
|
+
app.chatEvents.fireEvent('threadEvents', {
|
|
2107
|
+
type: 'THREAD_CLOSE',
|
|
2108
|
+
result: {
|
|
2109
|
+
thread: thread,
|
|
2110
|
+
typeCode: typeCode
|
|
2111
|
+
}
|
|
2112
|
+
});
|
|
2113
|
+
});
|
|
2114
|
+
} else {
|
|
2115
|
+
app.chatEvents.fireEvent('threadEvents', {
|
|
2116
|
+
type: 'THREAD_CLOSE',
|
|
2117
|
+
result: {
|
|
2118
|
+
thread: threadId,
|
|
2119
|
+
typeCode: typeCode
|
|
2120
|
+
}
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
break;
|
|
2124
|
+
|
|
2091
2125
|
/**
|
|
2092
2126
|
* Type 110 Active Call Participants List
|
|
2093
2127
|
*/
|
|
@@ -8334,6 +8368,20 @@ function Chat(params) {
|
|
|
8334
8368
|
this.getCurrentTypeCode = function () {
|
|
8335
8369
|
return app.typeCodes.getActiveTypeCode().typeCode;
|
|
8336
8370
|
};
|
|
8371
|
+
this.closeThread = function (params, callback) {
|
|
8372
|
+
return app.messenger.sendMessage({
|
|
8373
|
+
chatMessageVOType: _constants.chatMessageVOTypes.CLOSE_THREAD,
|
|
8374
|
+
typeCode: params.typeCode,
|
|
8375
|
+
subjectId: params.threadId,
|
|
8376
|
+
content: {},
|
|
8377
|
+
pushMsgType: 3,
|
|
8378
|
+
token: app.sdkParams.token
|
|
8379
|
+
}, {
|
|
8380
|
+
onResult: function onResult(result) {
|
|
8381
|
+
callback && callback(result);
|
|
8382
|
+
}
|
|
8383
|
+
});
|
|
8384
|
+
};
|
|
8337
8385
|
init();
|
|
8338
8386
|
}
|
|
8339
8387
|
module.exports = Chat;
|
package/package.json
CHANGED
package/src/buildConfig.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"12.6.9-snapshot.
|
|
1
|
+
{"version":"12.6.9-snapshot.1","date":"۱۴۰۵/۴/۲۸","VersionInfo":"Release: false, Snapshot: true, Is For Test: true"}
|
package/src/chat.js
CHANGED
|
@@ -2275,6 +2275,42 @@ function Chat(params) {
|
|
|
2275
2275
|
|
|
2276
2276
|
break;
|
|
2277
2277
|
|
|
2278
|
+
/**
|
|
2279
|
+
* Type 102 Close Thread
|
|
2280
|
+
*/
|
|
2281
|
+
case chatMessageVOTypes.CLOSE_THREAD:
|
|
2282
|
+
if (app.store.messagesCallbacks[uniqueId]) {
|
|
2283
|
+
app.store.messagesCallbacks[uniqueId](Utility.createReturnData(chatMessage.typeCode, chatMessage.ownerId, false, '', 0, messageContent));
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
if (app.sdkParams.fullResponseObject) {
|
|
2287
|
+
app.threadMethods.getThreads({
|
|
2288
|
+
threadIds: [threadId],
|
|
2289
|
+
typeCode,
|
|
2290
|
+
}, function (threadsResult) {
|
|
2291
|
+
var thread = threadsResult.result.threads[0];
|
|
2292
|
+
// thread.mute = true;
|
|
2293
|
+
|
|
2294
|
+
app.chatEvents.fireEvent('threadEvents', {
|
|
2295
|
+
type: 'THREAD_CLOSE',
|
|
2296
|
+
result: {
|
|
2297
|
+
thread: thread,
|
|
2298
|
+
typeCode
|
|
2299
|
+
}
|
|
2300
|
+
});
|
|
2301
|
+
});
|
|
2302
|
+
} else {
|
|
2303
|
+
app.chatEvents.fireEvent('threadEvents', {
|
|
2304
|
+
type: 'THREAD_CLOSE',
|
|
2305
|
+
result: {
|
|
2306
|
+
thread: threadId,
|
|
2307
|
+
typeCode,
|
|
2308
|
+
}
|
|
2309
|
+
});
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
break;
|
|
2313
|
+
|
|
2278
2314
|
/**
|
|
2279
2315
|
* Type 110 Active Call Participants List
|
|
2280
2316
|
*/
|
|
@@ -9387,6 +9423,21 @@ function Chat(params) {
|
|
|
9387
9423
|
return app.typeCodes.getActiveTypeCode().typeCode
|
|
9388
9424
|
};
|
|
9389
9425
|
|
|
9426
|
+
this.closeThread = function (params, callback) {
|
|
9427
|
+
return app.messenger.sendMessage({
|
|
9428
|
+
chatMessageVOType: chatMessageVOTypes.CLOSE_THREAD,
|
|
9429
|
+
typeCode: params.typeCode,
|
|
9430
|
+
subjectId: params.threadId,
|
|
9431
|
+
content: {},
|
|
9432
|
+
pushMsgType: 3,
|
|
9433
|
+
token: app.sdkParams.token
|
|
9434
|
+
}, {
|
|
9435
|
+
onResult: function (result) {
|
|
9436
|
+
callback && callback(result);
|
|
9437
|
+
}
|
|
9438
|
+
});
|
|
9439
|
+
};
|
|
9440
|
+
|
|
9390
9441
|
init();
|
|
9391
9442
|
}
|
|
9392
9443
|
|