Im currently trying to get this example to work
late final Session session;
try {
session = await account.getSession(sessionId: "current");
} on AppwriteException catch (e) {
print(e.message);
session = await account.createEmailPasswordSession(
email: "t@t.t", password: "testtest");
}
print("Session: $session");
final realtime = Realtime(client);
final realtimeSub = realtime.subscribe(
["documents"],
);
realtimeSub.stream.listen((event) {
print("Realtime event");
});
await Future.delayed(const Duration(seconds: 3));
final customer = {
"id": 123456,
"name": "John Doe",
};
final response = await database.createDocument(
databaseId: "default",
collectionId: "customers",
documentId: ID.unique(),
data: customer,
);
print("Document: $response");
final customers = await database.listDocuments(
databaseId: "default",
collectionId: "customers",
);
print("Customers: ${customers.documents}");
If the collections has create permission for the user and document security enabled then i dont receive a realtime event If the collection has the same permissions + read permissions for guests then im able to receive the realtime event
So im not sure what exactly im doing wrong. Am i creating the subscription wrong or am i missing something with the permissions?
Recommended threads
- image: openruntimes/executor:0.25.1 erro...
*this issue is not new and did happen on older versions using 0.7.22 removes the issue log ```ruby #2 /usr/local/app/http.php(78): Utopia\Http\Http->start() ...
- Executor with custom S3 doesn't work in ...
Was testing to upgrade appwrite to 1.9.5 and when testing the S3 part i saw the executor didn't work anymore. When looking closly i saw the `StorageFactory` doe...
- Function settings doesn't work on self-h...
When a function setting is changed (like for example the function name) the servers returns a 500. The "appwrite" containers print the following error: ```bash...