Created
March 1, 2016 23:26
-
-
Save andrewvmail/de06ab436b39895ce025 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-spec room_jid_to_subject(RoomJID :: ejabberd:jid()) -> {ok, pid()} | {error, not_found}. | |
room_jid_to_subject(#jid{luser=RoomName, lserver=MucService}) -> | |
case mnesia:dirty_read(muc_online_room, {RoomName, MucService}) of | |
[R] -> | |
{ok, R#muc_online_room.name_host}; | |
[] -> | |
{error, not_found} | |
end. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment