chat4app-client-angular 0.0.7 → 0.0.9
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/package.json
CHANGED
|
@@ -357,7 +357,26 @@ export class Chat4appClientAngularService implements OnInit {
|
|
|
357
357
|
chat4appMessage.data.all = datTmp;
|
|
358
358
|
|
|
359
359
|
chatCallback.onOffline(chat4appMessage);
|
|
360
|
-
|
|
360
|
+
|
|
361
|
+
} else if (data.type == "read" ) {
|
|
362
|
+
let chat4appMessage = new Chat4AppMessageReceive();
|
|
363
|
+
chat4appMessage.data.chatId = data.chatId;
|
|
364
|
+
chat4appMessage.data.chatMessageId = data.chatMessageId;
|
|
365
|
+
chat4appMessage.data.externalId = data.externalId;
|
|
366
|
+
chat4appMessage.data.fromId = data.fromId;
|
|
367
|
+
chat4appMessage.data.toId = data.toId;
|
|
368
|
+
chat4appMessage.data.dateHour = data.dateHour;
|
|
369
|
+
chat4appMessage.data.type = data.type;
|
|
370
|
+
|
|
371
|
+
let datTmp = new Map<string, string>();
|
|
372
|
+
|
|
373
|
+
for (let key in data) {
|
|
374
|
+
datTmp.set(key, data[key]);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
chat4appMessage.data.all = datTmp;
|
|
378
|
+
|
|
379
|
+
chatCallback.onRead(chat4appMessage);
|
|
361
380
|
}
|
|
362
381
|
}
|
|
363
382
|
|
|
@@ -396,6 +415,8 @@ export class Chat4appClientAngularService implements OnInit {
|
|
|
396
415
|
chatCallback.onMessage(msgObj);
|
|
397
416
|
} else if ((msgObj.data.type == "on" || msgObj.data.type == "off")) {
|
|
398
417
|
chatCallback.onOffline(msgObj);
|
|
418
|
+
} else if (msgObj.data.type == "read" ) {
|
|
419
|
+
chatCallback.onRead(msgObj);
|
|
399
420
|
}
|
|
400
421
|
|
|
401
422
|
//callback(msg.body);
|
|
@@ -568,5 +589,6 @@ export class Chat4appClientAngularService implements OnInit {
|
|
|
568
589
|
export interface IChatCallback {
|
|
569
590
|
onMessage(msg: Chat4AppMessageReceive): void;
|
|
570
591
|
onOffline(msg: Chat4AppMessageReceive): void;
|
|
592
|
+
onRead(msg: Chat4AppMessageReceive): void;
|
|
571
593
|
}
|
|
572
594
|
|