add a shim for "sub" push notifications
This commit is contained in:
@@ -329,6 +329,10 @@ class TinodeWeb extends React.Component {
|
|||||||
// Message read on another device, clear it here.
|
// Message read on another device, clear it here.
|
||||||
this.tinode.oobNotification('read', data.topic, data.seq);
|
this.tinode.oobNotification('read', data.topic, data.seq);
|
||||||
break;
|
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:
|
default:
|
||||||
console.warn("Unknown push type ignored", data.what, data);
|
console.warn("Unknown push type ignored", data.what, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7756,6 +7756,13 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
this.tinode.oobNotification('read', data.topic, data.seq);
|
this.tinode.oobNotification('read', data.topic, data.seq);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'sub':
|
||||||
|
this.tinode.oobNotification('sub', data.topic, -1, data.xfrom, {
|
||||||
|
give: data.modeGiven,
|
||||||
|
want: modeWant
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.warn("Unknown push type ignored", data.what, data);
|
console.warn("Unknown push type ignored", data.what, data);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5
-3
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user