Commit afe97d93 by Kim Peace

Merge branch 'feature/display_user_name_on_new_message' into 'develop'

ルームに入場している状態で新規メッセージを受信した場合loginで表示される問題対応

See merge request !143
parents 6802b30c 7450fe80
...@@ -233,11 +233,15 @@ function setSocketAction () { ...@@ -233,11 +233,15 @@ function setSocketAction () {
var replacePath = message.text; var replacePath = message.text;
replacePath = replacePath.replaceAll('?fileName=', '?sid=' + CHAT.globalLoginParameter.sid + '&fileName='); replacePath = replacePath.replaceAll('?fileName=', '?sid=' + CHAT.globalLoginParameter.sid + '&fileName=');
message.text = replacePath; message.text = replacePath;
//TODO newMessageの際にDB格納が必要。 var messageSender;
if (CHAT_UTIL.isIOS()) {
messageSender = JSON.parse(CHAT_DB.getUserInfoList(message.userId));
} else if (CHAT_UTIL.isAndroid()) {
messageSender = JSON.parse(android.getUserInfoList(message.userId));
}
let html = Mustache.render(template, { let html = Mustache.render(template, {
text: message.text, text: message.text,
from: message.from, from: messageSender[0].shopMemberName,
profileImage: message.profileImagePath, profileImage: message.profileImagePath,
shopMemberId: message.userId, shopMemberId: message.userId,
createdAtDay: messageTime.createdAtDay, createdAtDay: messageTime.createdAtDay,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment