mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
receive message
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/alasql@0.4"></script>
|
||||
<script>
|
||||
|
||||
var data = [ {a: 11, b: 10}, {a: 2, b: 20}, {a: 1, b: 30} ];
|
||||
|
||||
var res = alasql('SELECT * FROM ? WHERE a = 1',[data]);
|
||||
|
||||
console.log(res)
|
||||
|
||||
|
||||
|
||||
var data= [
|
||||
{a:{aa:10},b:{bb:2}},
|
||||
{a:{aa:10},b:{bb:2}},
|
||||
{a:{aa:2},b:{bb:2}},
|
||||
{a:{aa:3},b:{bb:3}}
|
||||
]
|
||||
|
||||
var res = alasql('SELECT a, b FROM ? WHERE b->bb = 2',[data]);
|
||||
|
||||
|
||||
console.log(res)
|
||||
|
||||
|
||||
alasql(`CREATE TABLE Persons (
|
||||
ID int NOT NULL PRIMARY KEY,
|
||||
LastName varchar(255) NOT NULL,
|
||||
FirstName varchar(255),
|
||||
Age int,
|
||||
jsn1 JSON(64000) CHARACTER SET LATIN
|
||||
);`);
|
||||
|
||||
alasql("INSERT INTO Persons VALUES (100, 'maquiran', 'peter', 18)");
|
||||
console.log(alasql("SELECT * FROM Persons "))
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -131,7 +131,7 @@ export class AuthService {
|
||||
localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
|
||||
this.autologout(10000);
|
||||
// this.autologout(10000);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@@ -77,6 +77,11 @@ export class RoomService {
|
||||
this.calDateDuration()
|
||||
}
|
||||
|
||||
|
||||
isSenderIsNotMe(ChatMessage) {
|
||||
return SessionStore.user.RochetChatUser != ChatMessage.u.username
|
||||
}
|
||||
|
||||
receiveMessage() {
|
||||
|
||||
this.WsChatService.updateRoomEventss(
|
||||
@@ -84,7 +89,7 @@ export class RoomService {
|
||||
"stream-room-messages",
|
||||
(ChatMessage) => {
|
||||
|
||||
if(environment.chatOffline == false) {
|
||||
if(environment.chatOffline == false || this.isSenderIsNotMe(ChatMessage)) {
|
||||
ChatMessage = ChatMessage.fields.args[0]
|
||||
ChatMessage = this.fix_updatedAt(ChatMessage)
|
||||
console.log('recivemessage', ChatMessage)
|
||||
@@ -99,14 +104,10 @@ export class RoomService {
|
||||
this.scrollDown()
|
||||
}, 100)
|
||||
|
||||
//this.sortService.sortDate(this.messages, '')
|
||||
|
||||
if(SessionStore.user.RochetChatUser != ChatMessage.u.username) {
|
||||
this.NativeNotificationService.sendNotificationChat({
|
||||
message: message.msg,
|
||||
title: this.name
|
||||
});
|
||||
}
|
||||
this.NativeNotificationService.sendNotificationChat({
|
||||
message: message.msg,
|
||||
title: this.name
|
||||
});
|
||||
|
||||
this.addMessageDB(ChatMessage)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user