diff options
author | fiaxh <git@lightrise.org> | 2024-05-26 18:24:54 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2024-06-19 20:08:07 +0200 |
commit | c8b20d0f5f33fb8b9898d216c3b4c9280abf31da (patch) | |
tree | b3e807134ea95c8365bad19ce97c03e3bcdedb9c /libdino/src/service/muc_manager.vala | |
parent | f1be90c02f26c942e67978fd6d10ff2feeec8f9e (diff) | |
download | dino-c8b20d0f5f33fb8b9898d216c3b4c9280abf31da.tar.gz dino-c8b20d0f5f33fb8b9898d216c3b4c9280abf31da.zip |
Store requested disco results with computed hash, use for offline determining of private MUCs
Diffstat (limited to 'libdino/src/service/muc_manager.vala')
-rw-r--r-- | libdino/src/service/muc_manager.vala | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index 119079f0..6b52fe36 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -232,15 +232,8 @@ public class MucManager : StreamInteractionModule, Object { //the term `private room` is a short hand for members-only+non-anonymous rooms public bool is_private_room(Account account, Jid jid) { - XmppStream? stream = stream_interactor.get_stream(account); - if (stream == null) { - return false; - } - Xep.Muc.Flag? flag = stream.get_flag(Xep.Muc.Flag.IDENTITY); - if (flag == null) { - return false; - } - return flag.has_room_feature(jid, Xep.Muc.Feature.NON_ANONYMOUS) && flag.has_room_feature(jid, Xep.Muc.Feature.MEMBERS_ONLY); + var entity_info = stream_interactor.get_module(EntityInfo.IDENTITY); + return entity_info.has_feature_offline(account, jid, "muc_membersonly") && entity_info.has_feature_offline(account, jid, "muc_nonanonymous"); } public bool is_moderated_room(Account account, Jid jid) { |