processMetaDesc method
Called by Tinode when meta.desc packet is received.
Called by 'me' topic on contact update (desc._noForwarding is true).
Implementation
void processMetaDesc(TopicDescription desc) {
if (Tools.isP2PTopicName(name!)) {
desc.defacs = null;
}
// Copy parameters from desc object to this topic
acs = desc.acs ?? acs;
clear = desc.clear ?? clear;
created = desc.created ?? created;
defacs = desc.defacs ?? defacs;
private = desc.private ?? private;
public = desc.public ?? public;
read = desc.read ?? read;
recv = desc.recv ?? recv;
seq = desc.seq ?? seq;
status = desc.status ?? status;
updated = desc.updated ?? updated;
touched = desc.touched ?? touched;
if (name == topic_names.TOPIC_ME && !desc.noForwarding!) {
var me = _tinodeService.getTopic(topic_names.TOPIC_ME);
if (me != null) {
me.processMetaSub([
TopicSubscription(
noForwarding: true,
topic: name,
updated: updated,
touched: touched,
acs: desc.acs,
seq: desc.seq,
read: desc.read,
recv: desc.recv,
public: desc.public,
private: desc.private,
)
]);
}
}
onMetaDesc.add(this);
}