Commit 02aed716 by Lee Munkyeong

Merge branch 'communication/feature/42982_招待されたユーザーが参加できない' into 'communication/develop'

プッシュメッセージから協業参加機能修正

See merge request !168
parents a3ef2300 ba4bfc29
......@@ -69,6 +69,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
Integer insertId = 0;
Integer messageType = 0;
Integer messageId = 0;
String roomType = "";
Log.d(TAG,"tempMsg : "+ tempMsg);
......@@ -97,6 +98,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
}
if (pushMsg.contains(INVITE_COLLABORATION)) {
roomType = Integer.toString(json.getInt("roomType"));
String[] inviteMessage = pushMsg.split("<::split>");
tempMsg = getString(R.string.msg_invite_collaboration);
Intent pushMsgDialog = new Intent(ABVFcmListenerService.this, ShowPushMessageDailogActivity.class);
......@@ -107,6 +109,7 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, pushSendLoginId); // sendLoginId
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, pushSendDate);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.collaborationType, inviteMessage[1]);
pushMsgDialog.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
startActivity(pushMsgDialog);
return;
}
......
......@@ -115,7 +115,9 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this, getRString(R.string.app_name), getIntent().getExtras().getString(PushMessageKey.message));
Bundle extras = getIntent().getExtras();
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
if (roomId != 0) {
if (roomId == 0) {
alertDialog.setPositiveButton(R.string.ok, null);
} else {
alertDialog.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
......@@ -127,25 +129,26 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
String pushSendLoginId = extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
long pushSendDate = extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
List<PushMessageDto> pushMessageDtoList = AbstractLogic.getLogic(PushMessageLogic.class).getAllPushMessageList();
Logger.d("pushSendDate","pushSendDate : " + pushSendDate);
Logger.d("pushSendDate", "pushSendDate : " + pushSendDate);
String pushSendDateDate = DateTimeUtil.toString(new Date(pushSendDate), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate","pushSendDateDate : " + pushSendDateDate);
Logger.d("pushSendDate", "pushSendDateDate : " + pushSendDateDate);
String pushSendDateDate2 = DateTimeUtil.toString(DateTimeUtil.toDate(pushSendDateDate, DateTimeFormat.yyyyMMddHHmmssSSS_none), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate","pushSendDateDate2 : " + pushSendDateDate2);
Logger.d("pushSendDate", "pushSendDateDate2 : " + pushSendDateDate2);
for (int i=0; i < pushMessageDtoList.size() - 1; i++) {
for (int i = 0; i < pushMessageDtoList.size() - 1; i++) {
String tempDate = DateTimeUtil.toString(pushMessageDtoList.get(i).pushSendDate, DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("tempDate","date : " + tempDate);
Logger.d("tempDate", "date : " + tempDate);
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType);
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType);
}
}
}
......@@ -159,8 +162,6 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
finish();
}
});
} else {
alertDialog.setPositiveButton(R.string.ok, null);
}
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
......
......@@ -144,5 +144,6 @@ public interface AppDefType {
String pushSendLoginId = "pushSendLoginId";
String pushSendDate = "pushSendDate";
String collaborationType = "collaborationType";
String roomType = "roomType";
}
}
......@@ -191,6 +191,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
sid = intent.getStringExtra("sid");
roomId = intent.getLongExtra("roomId", 0);
roomName = intent.getStringExtra("roomName");
roomType = intent.getStringExtra("roomType");
loginId = intent.getStringExtra("loginId");
shopName = intent.getStringExtra("shopName");
collaborationType = intent.getStringExtra("collaborationType");
......@@ -289,7 +290,9 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
e.printStackTrace();
}
Integer integerRoomId = Integer.parseInt(roomId.toString());
if (StringUtil.isNullOrEmpty(roomType)) {
roomType = communicationLogic.getChatRoom(integerRoomId).type.toString();
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
String parameterData = "sid=" + sid + "&loginId=" + loginId + "&shopName=" + shopName + "&roomId=" + roomId + "&roomName=" + roomName + fixedParam;
mChatWebView.postUrl(CHAT_ROOM_PAGE_URL, parameterData.getBytes());
......
......@@ -1926,7 +1926,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this.previousOfSettingActivity2 = activity;
}
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType) {
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
......@@ -1940,7 +1940,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("shopName", shopName);
intent.putExtra("roomId", roomId);
intent.putExtra("roomName", roomName);
intent.putExtra("roomType", roomType);
intent.setClassName(mContext.getPackageName(), className);
Activity activity2 = null;
......
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