summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Bridge.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Bridge.php b/src/Bridge.php
index 54f9880..9d59564 100644
--- a/src/Bridge.php
+++ b/src/Bridge.php
@@ -84,6 +84,22 @@ class Bridge {
return $count == 1;
}
+ public function registerMessage($postId, $messageId,
+ $inReplyTo, $references) {
+ throw_if_null($postId);
+ throw_if_null($messageId);
+
+ $sql = 'INSERT IGNORE INTO posts ' .
+ '(post_id, message_id, in_reply_to, refs) ' .
+ 'VALUES (' . $postId . ', '
+ . $this->db->quote($messageId) . ', '
+ . $this->quote($inReplyTo) . ', '
+ . $this->quote($references) . ')';
+
+ $count = $this->db->exec($sql);
+ return $count == 1;
+ }
+
public function unregisterMessage($messageId) {
throw_if_null($messageId);