Allow short and lonterm presence to work with alias and uri.
(cherry picked from commit c70cc025) (cherry picked from commit b8fc7fb1) (cherry picked from commit 647e4827)
From !1149 (merged)
(cherry picked from commit c70cc025) (cherry picked from commit b8fc7fb1) (cherry picked from commit 647e4827)
From !1149 (merged)