add a shim for "sub" push notifications

This commit is contained in:
or-else
2022-05-24 20:21:49 -07:00
parent 2b51f19fbd
commit 4ff315329c
7 changed files with 20 additions and 7 deletions
+4
View File
@@ -329,6 +329,10 @@ class TinodeWeb extends React.Component {
// Message read on another device, clear it here.
this.tinode.oobNotification('read', data.topic, data.seq);
break;
case 'sub':
// Subscription update: new subscription or subscription is deleted.
this.tinode.oobNotification('sub', data.topic, -1, data.xfrom, {give: data.modeGiven, want: data.modeWant});
break;
default:
console.warn("Unknown push type ignored", data.what, data);
}
+7
View File
@@ -7756,6 +7756,13 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
this.tinode.oobNotification('read', data.topic, data.seq);
break;
case 'sub':
this.tinode.oobNotification('sub', data.topic, -1, data.xfrom, {
give: data.modeGiven,
want: modeWant
});
break;
default:
console.warn("Unknown push type ignored", data.what, data);
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long