summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/exists.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-05-27 16:06:24 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-27 16:06:24 +0200
commit40add686913b7eb6edd5a780e37e7513b43a337f (patch)
tree75549dff97e5a15f732a505d4d00aa7a686bdad8 /internal/federation/federatingdb/exists.go
parentFaves (#31) (diff)
downloadgotosocial-40add686913b7eb6edd5a780e37e7513b43a337f.tar.xz
Notifications (#34)
Notifications working for: * Mentions * Faves * New follow requests * New followers
Diffstat (limited to 'internal/federation/federatingdb/exists.go')
-rw-r--r--internal/federation/federatingdb/exists.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/federation/federatingdb/exists.go b/internal/federation/federatingdb/exists.go
new file mode 100644
index 000000000..b5c10b895
--- /dev/null
+++ b/internal/federation/federatingdb/exists.go
@@ -0,0 +1,24 @@
+package federatingdb
+
+import (
+ "context"
+ "net/url"
+
+ "github.com/sirupsen/logrus"
+)
+
+// Exists returns true if the database has an entry for the specified
+// id. It may not be owned by this application instance.
+//
+// The library makes this call only after acquiring a lock first.
+func (f *federatingDB) Exists(c context.Context, id *url.URL) (exists bool, err error) {
+ l := f.log.WithFields(
+ logrus.Fields{
+ "func": "Exists",
+ "id": id.String(),
+ },
+ )
+ l.Debugf("entering EXISTS function with id %s", id.String())
+
+ return false, nil
+}