diff options
-rw-r--r-- | .github/workflows/ci.yml | 1 | ||||
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 5 | ||||
-rw-r--r-- | vnext/server/sender.js | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22423cae..e948dbdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,6 @@ jobs: - name: Run tests (H2) run: ./mvnw -Pdefault clean package - name: Run tests (SQLite) - if: false run: ./mvnw -Psqlite clean package - name: Run tests (PostgreSQL) run: ./mvnw -Ppostgres clean package diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 84034428..34e72ec7 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2096,8 +2096,9 @@ public class ServerTests { User newUser = userService.createUser("newuser", "assword").orElseThrow(IllegalStateException::new); assertThat(newUser.getUid(), greaterThanOrEqualTo(0)); assertThat(newUser.getSeen(), is(nullValue())); - messagesService.createMessage(newUser.getUid(), "YO", null, Set.of()); - assertThat(userService.getUserByUID(newUser.getUid()).get().getSeen(), greaterThanOrEqualTo(now)); + var mid = messagesService.createMessage(newUser.getUid(), "YO", null, Set.of()); + var msg = messagesService.getMessage(mid); + assertThat(userService.getUserByUID(newUser.getUid()).get().getSeen(), is(msg.get().getCreated())); } @Test diff --git a/vnext/server/sender.js b/vnext/server/sender.js index d5272bfb..acfd3b75 100644 --- a/vnext/server/sender.js +++ b/vnext/server/sender.js @@ -70,11 +70,11 @@ export function sendNotification(productionIds, sandboxIds, data) { log(`${badTokens.length} APNS tokens deleted`) } }) - results.filter(r => r.method === 'gcm') + results.filter(r => r.method === 'fcm') .forEach(async r => { let badTokens = r.message.filter(m => m.errorMsg === 'NotRegistered' || m.errorMsg === 'MismatchSenderId' - || m.errorMsg === 'InvalidRegistration').map(m => { + || m.errorMsg === 'InvalidRegistration' || m.errorMsg === 'Requested entity was not found.').map(m => { return { 'type': 'fcm', 'token': m.regId } }) if (badTokens.length > 0) { |