inProgress-team / inProgress-team/react-native-meteor

Local Collection synchronisation: Wait until user is logged in

Open
#96 1 comment 0 reactions 0 assignees View on GitHub
Bug
Dominant language
JavaScript
Stars
688
Forks
200
PR merge metrics
No merged PRs in 30d

Description

Hey,
I'm having some trouble with my chat application. If I send a message while I am offline, it is added to the local Mongo collection. When I go online, it gets suddenly removed. I find out, that the problem occurs within our allow/deny method:

```
Messages.allow({
insert(userId, doc) {

if(!userId) {
console.log("FORBIDDEN ACCESS");
return false;
}

[....]

return true;
});
```

In this case, userId isn't set and the message gets removed. Maybe we should wait until the user is logged in again and then starting sync the collection data?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.