summaryrefslogtreecommitdiffstats
path: root/src/core/ephraim.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ephraim.erl')
-rw-r--r--src/core/ephraim.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/ephraim.erl b/src/core/ephraim.erl
index d558eda..c8783f0 100644
--- a/src/core/ephraim.erl
+++ b/src/core/ephraim.erl
@@ -59,6 +59,14 @@ get_conv(State, JID) ->
end
end.
+-spec get_alias(binary()) -> binary().
+get_alias(JID) ->
+ ephraim ! {self(),get_alias,JID},
+ receive
+ {alias,JID,Alias} ->
+ Alias
+ end.
+
-spec loop(#state{}) -> ok.
loop(State) ->
receive
@@ -139,6 +147,10 @@ loop(State) ->
end,
loop(State);
+ {Pid, get_alias, JID} ->
+ State#state.roster ! {Pid,get_alias,JID},
+ loop(State);
+
Msg ->
io:format("ephraim: ~p~n", [Msg]),
loop(State)