Commit d924714fd7474a7d73b751fe430fedcf721757fb
Committed by
Antonio Terceiro
1 parent
128b006c
Exists in
staging
and in
42 other branches
Fix how nick is calculated in rosterusers VIEW in database
- even if nickname is blank we should display proper name Signed-off-by: Antonio Terceiro <terceiro@colivre.coop.br>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
util/chat/postgresql/ejabberd.sql
... | ... | @@ -46,7 +46,7 @@ CREATE VIEW rosterusers AS |
46 | 46 | select |
47 | 47 | p1.identifier AS username, -- text NOT NULL, |
48 | 48 | p2.identifier || '@' || d.name AS jid, -- text NOT NULL, |
49 | - coalesce(p2.nickname, p2.name) AS nick, -- text NOT NULL, | |
49 | + CASE WHEN p2.nickname='' THEN p2.name WHEN p2.nickname IS NULL THEN p2.name ELSE p2.nickname END as nick, -- text NOT NULL, | |
50 | 50 | 'B' AS subscription, -- character(1) NOT NULL, |
51 | 51 | 'N' AS ask, -- character(1) NOT NULL, |
52 | 52 | '' AS askmessage, -- text NOT NULL, | ... | ... |