diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-09 17:33:08 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-09 19:02:21 +0300 |
commit | fbf72c1af50bfac5d1008249add629fdd5c9aca7 (patch) | |
tree | 663f4420efbbea7bb1c982e98cfcf4a15919a3b8 /lib/Signaling | |
parent | b9b76ff9a7fdf880477d06bf85a5d8d102fef11f (diff) |
Create a new table for internal signaling and guest names with a PK
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Signaling')
-rw-r--r-- | lib/Signaling/Messages.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Signaling/Messages.php b/lib/Signaling/Messages.php index 09d5f5fa6..8f695442c 100644 --- a/lib/Signaling/Messages.php +++ b/lib/Signaling/Messages.php @@ -54,7 +54,7 @@ class Messages { */ public function deleteMessages(array $sessionIds): void { $query = $this->db->getQueryBuilder(); - $query->delete('talk_signaling') + $query->delete('talk_internalsignaling') ->where($query->expr()->in('recipient', $query->createNamedParameter($sessionIds, IQueryBuilder::PARAM_STR_ARRAY))) ->orWhere($query->expr()->in('sender', $query->createNamedParameter($sessionIds, IQueryBuilder::PARAM_STR_ARRAY))); $query->execute(); @@ -67,7 +67,7 @@ class Messages { */ public function addMessage(string $senderSessionId, string $recipientSessionId, string $message): void { $query = $this->db->getQueryBuilder(); - $query->insert('talk_signaling') + $query->insert('talk_internalsignaling') ->values( [ 'sender' => $query->createNamedParameter($senderSessionId), @@ -85,7 +85,7 @@ class Messages { */ public function addMessageForAllParticipants(Room $room, string $message): void { $query = $this->db->getQueryBuilder(); - $query->insert('talk_signaling') + $query->insert('talk_internalsignaling') ->values( [ 'sender' => $query->createParameter('sender'), @@ -123,7 +123,7 @@ class Messages { $query = $this->db->getQueryBuilder(); $query->select('*') - ->from('talk_signaling') + ->from('talk_internalsignaling') ->where($query->expr()->eq('recipient', $query->createNamedParameter($sessionId))) ->andWhere($query->expr()->lte('timestamp', $query->createNamedParameter($time))); $result = $query->execute(); @@ -134,7 +134,7 @@ class Messages { $result->closeCursor(); $query = $this->db->getQueryBuilder(); - $query->delete('talk_signaling') + $query->delete('talk_internalsignaling') ->where($query->expr()->eq('recipient', $query->createNamedParameter($sessionId))) ->andWhere($query->expr()->lte('timestamp', $query->createNamedParameter($time))); $query->execute(); @@ -151,7 +151,7 @@ class Messages { $time = $this->timeFactory->getTime() - $olderThan; $query = $this->db->getQueryBuilder(); - $query->delete('talk_signaling') + $query->delete('talk_internalsignaling') ->where($query->expr()->lt('timestamp', $query->createNamedParameter($time))); $query->execute(); } |