Implement CONTACTEMAIL and CONTACTPAGER macros.

This commit is contained in:
Gunnar Beutner 2013-08-30 15:16:25 +02:00
parent c194ad1ca3
commit b94f1603bb
1 changed files with 11 additions and 2 deletions

View File

@ -128,10 +128,19 @@ bool User::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *res
*result = GetDisplayName();
return true;
} else {
String tmacro;
if (macro == "CONTACTEMAIL")
tmacro = "email";
else if (macro == "CONTACTPAGER")
tmacro = "pager";
else
tmacro = macro;
Dictionary::Ptr macros = GetMacros();
if (macros && macros->Contains(macro)) {
*result = macros->Get(macro);
if (macros && macros->Contains(tmacro)) {
*result = macros->Get(tmacro);
return true;
}