@capacitor-community/fcm 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +21 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -22,13 +22,13 @@
22
22
  <table>
23
23
  <tr>
24
24
  <td align="center">
25
- <a href="https://intenseloop.com">
26
- <img src="https://static.intenseloop.com/assets/logo-512x512.png" width="40" />
25
+ <a href="https://chatness.ai">
26
+ <img src="https://cdn.chatness.ai/images/logo-white-symbol.png" width="40" />
27
27
  </a>
28
28
  </td>
29
29
  <td>
30
- <a href="https://intenseloop.com">
31
- Intenseloop
30
+ <a href="https://chatness.ai">
31
+ Chatness AI
32
32
  </a>
33
33
  </td>
34
34
  </tr>
@@ -83,8 +83,8 @@ npx cap sync
83
83
  ## Usage
84
84
 
85
85
  ```ts
86
- import { FCM } from "@capacitor-community/fcm";
87
- import { PushNotifications } from "@capacitor/push-notifications";
86
+ import { FCM } from '@capacitor-community/fcm';
87
+ import { PushNotifications } from '@capacitor/push-notifications';
88
88
 
89
89
  // external required step
90
90
  // register for push
@@ -92,36 +92,36 @@ await PushNotifications.requestPermissions();
92
92
  await PushNotifications.register();
93
93
 
94
94
  // now you can subscribe to a specific topic
95
- FCM.subscribeTo({ topic: "test" })
96
- .then((r) => alert(`subscribed to topic`))
97
- .catch((err) => console.log(err));
95
+ FCM.subscribeTo({ topic: 'test' })
96
+ .then(r => alert(`subscribed to topic`))
97
+ .catch(err => console.log(err));
98
98
 
99
99
  // Unsubscribe from a specific topic
100
- FCM.unsubscribeFrom({ topic: "test" })
100
+ FCM.unsubscribeFrom({ topic: 'test' })
101
101
  .then(() => alert(`unsubscribed from topic`))
102
- .catch((err) => console.log(err));
102
+ .catch(err => console.log(err));
103
103
 
104
- // Get FCM token instead the APN one returned by Capacitor
104
+ // Get FCM token instead of the APN one returned by Capacitor
105
105
  FCM.getToken()
106
- .then((r) => alert(`Token ${r.token}`))
107
- .catch((err) => console.log(err));
106
+ .then(r => alert(`Token ${r.token}`))
107
+ .catch(err => console.log(err));
108
108
 
109
109
  // Delete the old FCM token and get a new one
110
- FCM.refrehToken()
111
- .then((r) => alert(`Token ${r.token}`))
112
- .catch((err) => console.log(err));
110
+ FCM.refreshToken()
111
+ .then(r => alert(`Token ${r.token}`))
112
+ .catch(err => console.log(err));
113
113
 
114
114
  // Remove FCM instance
115
115
  FCM.deleteInstance()
116
116
  .then(() => alert(`Token deleted`))
117
- .catch((err) => console.log(err));
117
+ .catch(err => console.log(err));
118
118
 
119
119
  // Enable the auto initialization of the library
120
120
  FCM.setAutoInit({ enabled: true }).then(() => alert(`Auto init enabled`));
121
121
 
122
122
  // Check the auto initialization status
123
- FCM.isAutoInitEnabled().then((r) => {
124
- console.log("Auto init is " + (r.enabled ? "enabled" : "disabled"));
123
+ FCM.isAutoInitEnabled().then(r => {
124
+ console.log('Auto init is ' + (r.enabled ? 'enabled' : 'disabled'));
125
125
  });
126
126
  ```
127
127
 
@@ -220,7 +220,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
220
220
  <table>
221
221
  <tbody>
222
222
  <tr>
223
- <td align="center" valign="top" width="20%"><a href="https://twitter.com/stewones"><img src="https://avatars1.githubusercontent.com/u/719763?v=4?s=75" width="75px;" alt="Stew"/><br /><sub><b>Stew</b></sub></a><br /><a href="https://github.com/capacitor-community/fcm/commits?author=stewones" title="Code">💻</a> <a href="https://github.com/capacitor-community/fcm/commits?author=stewones" title="Documentation">📖</a></td>
223
+ <td align="center" valign="top" width="20%"><a href="https://twitter.com/stewones"><img src="https://avatars1.githubusercontent.com/u/719763?v=4?s=75" width="75px;" alt="stewones"/><br /><sub><b>stewones</b></sub></a><br /><a href="https://github.com/capacitor-community/fcm/commits?author=stewones" title="Code">💻</a> <a href="https://github.com/capacitor-community/fcm/commits?author=stewones" title="Documentation">📖</a></td>
224
224
  <td align="center" valign="top" width="20%"><a href="https://github.com/danielprrazevedo"><img src="https://avatars2.githubusercontent.com/u/20153661?v=4?s=75" width="75px;" alt="Daniel Pereira"/><br /><sub><b>Daniel Pereira</b></sub></a><br /><a href="https://github.com/capacitor-community/fcm/commits?author=danielprrazevedo" title="Code">💻</a> <a href="https://github.com/capacitor-community/fcm/commits?author=danielprrazevedo" title="Documentation">📖</a></td>
225
225
  <td align="center" valign="top" width="20%"><a href="http://priyankpatel.io/"><img src="https://avatars3.githubusercontent.com/u/5585797?v=4?s=75" width="75px;" alt="Priyank Patel"/><br /><sub><b>Priyank Patel</b></sub></a><br /><a href="https://github.com/capacitor-community/fcm/commits?author=priyankpat" title="Code">💻</a></td>
226
226
  <td align="center" valign="top" width="20%"><a href="http://fuubar.wordpress.com/"><img src="https://avatars1.githubusercontent.com/u/1230033?v=4?s=75" width="75px;" alt="Nikolas"/><br /><sub><b>Nikolas</b></sub></a><br /><a href="#maintenance-nikoskip" title="Maintenance">🚧</a></td>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor-community/fcm",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Enable Firebase Cloud Messaging features for Capacitor apps",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",