deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
914 stars 167 forks source link

clicking on system message that is not from webxdc still jumps to previous message #2933

Closed Simon-Laux closed 1 year ago

Simon-Laux commented 1 year ago

this should not be the case, should it? Is there even a way to know whether a system message is from a webxdc or not?

r10s commented 1 year ago

this should not be the case, should it?

it should not be the case.

Is there even a way to know whether a system message is from a webxdc or not?

yes, by checking if the message parent is of type DC_MSG_WEBXDC.

here is the corresponding android check: https://github.com/deltachat/deltachat-android/blob/master/src/org/thoughtcrime/securesms/ConversationFragment.java#L795

(in theory, also get_info_type() should return WebxdcInfoMessage, however, that is not tested or documented yet and checking the parent messages seems to be the more future proof approach in case we add more types)

Simon-Laux commented 1 year ago

I'd prefer using get_info_type(), the other option might require more calls to the backend or in the jsonrpc layer. info type will be available with https://github.com/deltachat/deltachat-core-rust/pull/3707