open contact in scope when tapping info messages (#3710)

* open contact in scope when tapping info messages

* update CHANGELOG

---------

Co-authored-by: adb <adb@merlinux.eu>
This commit is contained in:
bjoern
2025-04-12 00:22:24 +02:00
committed by GitHub
parent d66acbb71e
commit bc73e1a2ba
4 changed files with 22 additions and 6 deletions
@@ -122,6 +122,7 @@ public class DcMsg {
public native boolean hasLocation ();
public native int getType ();
public native int getInfoType ();
public native int getInfoContactId ();
public native int getState ();
public native int getDownloadState ();
public native int getChatId ();
@@ -753,12 +753,20 @@ public class ConversationFragment extends MessageSelectorFragment
}
}
else {
String self_mail = dcContext.getConfig("configured_mail_user");
if (self_mail != null && !self_mail.isEmpty()
&& messageRecord.getText().contains(self_mail)
&& getListAdapter().getChat().isDeviceTalk()) {
// This is a device message informing the user that the password is wrong
startActivity(new Intent(getActivity(), RegistrationActivity.class));
int infoContactId = messageRecord.getInfoContactId();
if (infoContactId != 0 && infoContactId != DC_CONTACT_ID_SELF) {
Intent intent = new Intent(getContext(), ProfileActivity.class);
intent.putExtra(ProfileActivity.CONTACT_ID_EXTRA, infoContactId);
startActivity(intent);
}
else {
String self_mail = dcContext.getConfig("configured_mail_user");
if (self_mail != null && !self_mail.isEmpty()
&& messageRecord.getText().contains(self_mail)
&& getListAdapter().getChat().isDeviceTalk()) {
// This is a device message informing the user that the password is wrong
startActivity(new Intent(getActivity(), RegistrationActivity.class));
}
}
}
}