don't send {not} for own messages; explicit defacs in p2p {sub}
This commit is contained in:
@@ -356,9 +356,9 @@ class MessagesView extends React.Component {
|
|||||||
newState.scrollPosition = 0;
|
newState.scrollPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Aknowledge all messages, including own messages.
|
// Aknowledge messages except own messages.
|
||||||
let status = topic.msgStatus(msg);
|
const status = topic.msgStatus(msg);
|
||||||
if (status >= Tinode.MESSAGE_STATUS_SENT) {
|
if (status >= Tinode.MESSAGE_STATUS_SENT && msg.from != this.props.myUserId) {
|
||||||
this.props.readTimerHandler(() => {
|
this.props.readTimerHandler(() => {
|
||||||
topic.noteRead(msg.seq);
|
topic.noteRead(msg.seq);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ class TinodeWeb extends React.Component {
|
|||||||
// Sending "received" notifications
|
// Sending "received" notifications
|
||||||
tnData(data) {
|
tnData(data) {
|
||||||
const topic = this.tinode.getTopic(data.topic);
|
const topic = this.tinode.getTopic(data.topic);
|
||||||
if (topic.msgStatus(data) >= Tinode.MESSAGE_STATUS_SENT) {
|
if (topic.msgStatus(data) >= Tinode.MESSAGE_STATUS_SENT && data.from != this.state.myUserId) {
|
||||||
clearTimeout(this.receivedTimer);
|
clearTimeout(this.receivedTimer);
|
||||||
this.receivedTimer = setTimeout(() => {
|
this.receivedTimer = setTimeout(() => {
|
||||||
this.receivedTimer = undefined;
|
this.receivedTimer = undefined;
|
||||||
@@ -690,7 +690,6 @@ class TinodeWeb extends React.Component {
|
|||||||
showInfoPanel: false
|
showInfoPanel: false
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("handleTopicSelected: null navigation");
|
|
||||||
HashNavigation.navigateTo(HashNavigation.setUrlTopic('', null));
|
HashNavigation.navigateTo(HashNavigation.setUrlTopic('', null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -948,9 +947,13 @@ class TinodeWeb extends React.Component {
|
|||||||
const topicName = peerName || this.tinode.newGroupTopicName();
|
const topicName = peerName || this.tinode.newGroupTopicName();
|
||||||
const params = {
|
const params = {
|
||||||
_topicName: topicName,
|
_topicName: topicName,
|
||||||
sub: {mode: DEFAULT_ACCESS_MODE}
|
|
||||||
};
|
};
|
||||||
if (!peerName) {
|
if (peerName) {
|
||||||
|
// Because we are initialing the subscription, set 'want' to all permissions.
|
||||||
|
params.sub = {mode: DEFAULT_ACCESS_MODE};
|
||||||
|
// Give the other user all permissions too.
|
||||||
|
params.desc = {defacs: {auth: DEFAULT_ACCESS_MODE}};
|
||||||
|
} else {
|
||||||
params.desc = {public: pub, private: {comment: priv}};
|
params.desc = {public: pub, private: {comment: priv}};
|
||||||
params.tags = tags;
|
params.tags = tags;
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-20
File diff suppressed because one or more lines are too long
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
Reference in New Issue
Block a user