merged with next
This commit is contained in:
@@ -347,21 +347,7 @@ class TinodeWeb extends React.Component {
|
||||
|
||||
// Tinode received a push notification from the server.
|
||||
handlePushMessage(payload) {
|
||||
const data = payload.data || {};
|
||||
switch (data.what) {
|
||||
case 'msg':
|
||||
if (Tinode.isChannelTopicName(data.topic)) {
|
||||
// The last argument is a fake user Id: otherwise the update is seen as one from the current user.
|
||||
this.tinode.oobNotification('msg', data.topic, data.seq, 'fake-uid');
|
||||
}
|
||||
break;
|
||||
case 'read':
|
||||
// Message read on another device, clear it here.
|
||||
this.tinode.oobNotification('read', data.topic, data.seq);
|
||||
break;
|
||||
default:
|
||||
console.warn("Unknown push type ignored", data.what, data);
|
||||
}
|
||||
this.tinode.oobNotification(payload.data || {});
|
||||
}
|
||||
|
||||
initFCMessaging() {
|
||||
@@ -622,7 +608,7 @@ class TinodeWeb extends React.Component {
|
||||
this.handleError(
|
||||
formatMessage(messages.reconnect_countdown, {seconds: timeLeft}),
|
||||
'warn',
|
||||
() => {
|
||||
_ => {
|
||||
clearInterval(this.reconnectCountdown);
|
||||
this.tinode.reconnect();
|
||||
},
|
||||
@@ -1532,6 +1518,12 @@ class TinodeWeb extends React.Component {
|
||||
defaultTopicContextMenu(topicName) {
|
||||
const topic = this.tinode.getTopic(topicName);
|
||||
|
||||
if (topic._deleted) {
|
||||
return [
|
||||
'topic_delete'
|
||||
];
|
||||
}
|
||||
|
||||
let muted = false, blocked = false, self_blocked = false, subscribed = false, deleter = false, archived = false;
|
||||
if (topic) {
|
||||
subscribed = topic.isSubscribed();
|
||||
|
||||
Reference in New Issue
Block a user