From 39cf8d86d62defcbeba5e6935c8b19ee3df1dd76 Mon Sep 17 00:00:00 2001 From: Evgeny Khramtsov Date: Thu, 27 Jun 2019 15:22:27 +0300 Subject: Avoid using broad map() type wherever possible --- include/mod_muc_room.hrl | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'include/mod_muc_room.hrl') diff --git a/include/mod_muc_room.hrl b/include/mod_muc_room.hrl index ac58c1f5..46eb149b 100644 --- a/include/mod_muc_room.hrl +++ b/include/mod_muc_room.hrl @@ -105,13 +105,13 @@ access = {none,none,none,none,none} :: {atom(), atom(), atom(), atom(), atom()}, jid = #jid{} :: jid(), config = #config{} :: config(), - users = #{} :: map(), - subscribers = #{} :: map(), - subscriber_nicks = #{} :: map(), + users = #{} :: users(), + subscribers = #{} :: subscribers(), + subscriber_nicks = #{} :: subscriber_nicks(), last_voice_request_time = treap:empty() :: treap:treap(), - robots = #{} :: map(), - nicks = #{} :: map(), - affiliations = #{} :: map(), + robots = #{} :: robots(), + nicks = #{} :: nicks(), + affiliations = #{} :: affiliations(), history = #lqueue{} :: lqueue(), subject = [] :: [text()], subject_author = <<"">> :: binary(), @@ -120,3 +120,10 @@ room_shaper = none :: ejabberd_shaper:shaper(), room_queue :: p1_queue:queue() | undefined }). + +-type users() :: #{ljid() => #user{}}. +-type robots() :: #{jid() => {binary(), stanza()}}. +-type nicks() :: #{binary() => [ljid()]}. +-type affiliations() :: #{ljid() => affiliation() | {affiliation(), binary()}}. +-type subscribers() :: #{ljid() => #subscriber{}}. +-type subscriber_nicks() :: #{binary() => [ljid()]}. -- cgit v1.2.3