diff options
author | 2021-05-27 16:06:24 +0200 | |
---|---|---|
committer | 2021-05-27 16:06:24 +0200 | |
commit | 40add686913b7eb6edd5a780e37e7513b43a337f (patch) | |
tree | 75549dff97e5a15f732a505d4d00aa7a686bdad8 /internal/federation/federatingdb/exists.go | |
parent | Faves (#31) (diff) | |
download | gotosocial-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.go | 24 |
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 +} |