aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/core/assets
diff options
context:
space:
mode:
authorMarvin Borner2018-05-09 23:26:06 +0200
committerMarvin Borner2018-05-09 23:26:06 +0200
commit72ca4fbbdb9ff3a5514ddb1d1a3f6808990ac09d (patch)
treead81b4565ee4051f438a4ff4eb851589460e2ed8 /main/app/sprinkles/core/assets
parent059d13ce68abe51305da0522786cd6ee9547e415 (diff)
Added private chat database insert
Diffstat (limited to 'main/app/sprinkles/core/assets')
-rw-r--r--main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php b/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php
index 97a9a24..e4f7f30 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php
@@ -100,7 +100,6 @@ class ChatProcessor implements MessageComponentInterface
case "ChatMessage": // MESSAGE RECEIVED
if (isset($this->channels[$conn->resourceId])) {
$target = $this->channels[$conn->resourceId]; // target = ALL CHANNELS TO SEND THE MESSAGE
- $this->getHttpCode("https://beam-messenger.de/wormhole/" . file("/AccessToken.txt", FILE_IGNORE_NEW_LINES)["0"] . "/new/message/" . $this->userInfo[$conn->resourceId]->id . "/" . $this->userInfo[array_flip($this->channels)[$target]]->id . "/" . $data->Message);
foreach ($this->channels as $id => $channel) {
if ($channel == $target) {
$MessageObject = new \stdClass();
@@ -117,6 +116,7 @@ class ChatProcessor implements MessageComponentInterface
}
$MessageJson = json_encode($MessageObject, TRUE);
$this->users[$id]->send($MessageJson);
+ $this->getHttpCode("https://beam-messenger.de/wormhole/" . file("/AccessToken.txt", FILE_IGNORE_NEW_LINES)["0"] . "/new/message/" . $this->userInfo[$conn->resourceId]->id . "/" . $this->userInfo[array_flip($this->channels)[$target]]->id . "/" . $data->Message);
}
}
}