diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7dc292a1e..be3e8d9c5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,19 @@
+
+## [5.0.2](https://github.com/angular/angularfire2/compare/5.0.1...5.0.2) (2018-09-21)
+
+### Bug Fixes
+
+* **messaging:** Fix for the binding issue and onTokenRefresh for Messaging ([e170da1](https://github.com/angular/angularfire2/commit/e170da1))
+
+
+
+# [5.0.1](https://github.com/angular/angularfire2/compare/5.0.0...5.0.1) (2018-09-07)
+
+Version 5.0.1 has been released for the deprecated `angularfire2` NPM library; this simply re-exports everything from `@angular/fire`; allowing you to use either `angularfire2` or `@angular/fire` in your imports and `package.json`.
+
+It will have it's dependency pinned to the corresponding minor and will be released alongside future `@angular/fire` releases for the rest of the 5.x series.
+
+
# [5.0.0](https://github.com/angular/angularfire2/compare/5.0.0-rc.12...5.0.0) (2018-09-04)
diff --git a/docs/messaging/messaging.md b/docs/messaging/messaging.md
index f5b126e3b..a5c250b6f 100644
--- a/docs/messaging/messaging.md
+++ b/docs/messaging/messaging.md
@@ -15,7 +15,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AngularFireModule } from '@angular/fire';
-import { AngularFireStorageModule } from '@angular/fire/messaging';
+import { AngularFireMessagingModule } from '@angular/fire/messaging';
import { environment } from '../environments/environment';
@NgModule({
diff --git a/package.json b/package.json
index d89c01721..b90f783aa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angularfire2",
- "version": "5.0.0",
+ "version": "5.0.2",
"description": "The official library of Firebase and Angular.",
"private": true,
"scripts": {
@@ -12,7 +12,7 @@
"delayed_karma": "sleep 10 && karma start",
"build": "rm -rf dist && node tools/build.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
- "build:wrapper": "npm i --prefix wrapper && VERSION=5.0.0 npm run --prefix wrapper build"
+ "build:wrapper": "npm i --prefix wrapper && VERSION=5.0.2 npm run --prefix wrapper build"
},
"keywords": [
"angular",
diff --git a/src/core/package.json b/src/core/package.json
index 4eb8e1fdc..138de9948 100644
--- a/src/core/package.json
+++ b/src/core/package.json
@@ -1,7 +1,7 @@
{
"name": "@angular/fire",
"version": "ANGULARFIRE2_VERSION",
- "description": "The core module",
+ "description": "The official library for Firebase and Angular",
"main": "./bundles/core.umd.js",
"module": "index.js",
"es2015": "es2015/index.js",
diff --git a/src/messaging/messaging.ts b/src/messaging/messaging.ts
index 95f0087b0..6114a87f2 100644
--- a/src/messaging/messaging.ts
+++ b/src/messaging/messaging.ts
@@ -53,7 +53,9 @@ export class AngularFireMessaging {
);
const tokenChanges = this.messaging.pipe(
- switchMap(messaging => new Observable(messaging.onTokenRefresh)),
+ switchMap(messaging => new Observable(messaging.onTokenRefresh.bind(messaging)).pipe(
+ switchMap(() => messaging.getToken())
+ )),
runOutsideAngular(zone)
);
@@ -62,7 +64,7 @@ export class AngularFireMessaging {
);
this.messages = this.messaging.pipe(
- switchMap(messaging => new Observable(messaging.onMessage)),
+ switchMap(messaging => new Observable(messaging.onMessage.bind(messaging))),
runOutsideAngular(zone)
);