aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xml (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-01-31optimize importsChristian Schneppe1-2/+0
2019-09-20migrate to AndroidXChristian Schneppe1-3/+1
2019-09-12when parsing omemo messages ensure we only find one elementChristian Schneppe1-0/+13
2019-09-12inherit language from parent message when finding localized bodyChristian Schneppe1-1/+3
2019-09-12show language in message bubble if multiple language variants were receivedChristian Schneppe2-25/+59
XML and by inheritence XMPP has the feature of transmitting multiple language variants for the same content. This can be really useful if, for example, you are talking to an automated system. A chat bot could greet you in your own language. On the wire this will usually look like this: ```xml <message to="you"> <body>Good morning</body> <body xml:lang="de">Guten Morgen</body> </message> ``` However receiving such a message in a group chat can be very confusing and potentially dangerous if the sender puts conflicting information in there and different people get shown different strings. Disabling support for localization entirely isn’t an ideal solution as on principle it is still a good feature; and other clients might still show a localization even if Conversations would always show the default language. So instead we now show the displayed language in a corner of the message bubble if more than one translation has been received. If multiple languages are received we will attempt to find one in the language the operating system is set to. If no such translation can be found it will attempt to display the English string. If English can not be found either (for example a message that only has ru and fr on a phone that is set to de) it will display what ever language came first. Furthermore we will discard (not show at all) messages with with multiple bodies of the same language. (This is considered an invalid message) The language tag will not be shown if we receive a single body in a language not understood by the user. (For example operating system set to 'de' and message received with one body in 'ru' will just display that body as usual.) As a guide line to the user: If you are reading a message where it is important that this message is not interpreted differently by different people (like a vote (+1 / -1) in a chat room) make sure it has *no* language tag.
2019-07-17use helper method to close socketChristian Schneppe1-2/+8
2019-01-25explicitly start service (instead of just bind) service from contact chooserChristian Schneppe1-3/+4
2018-10-01fixed sni and alpn for kitkatChristian Schneppe1-1/+1
2018-07-15fall back to random subject langugae in case there is no english oneChristian Schneppe1-3/+6
2018-07-09reset subject and name on emptyChristian Schneppe1-0/+5
2018-05-02convert empty resources in messages to bare jidChristian Schneppe1-1/+2
2018-05-02return InvalidJid object instead of null if Jid can not be parsedChristian Schneppe1-1/+2
2018-04-07fixed rare crash on jolla devicesChristian Schneppe1-4/+1
2018-04-02migrate to xmpp-addrChristian Schneppe1-4/+3
2018-04-01use translated version of subject if availableChristian Schneppe1-0/+26
2018-01-21remove wakelocks in XmlReaderChristian Schneppe1-21/+1
2018-01-21use countdownlatch to check if TagWriter has finishedChristian Schneppe1-4/+13
2018-01-21fixed interupt handlingChristian Schneppe1-1/+3
2017-05-31do not check if namespace equals prefix for attributesChristian Schneppe1-1/+1
2017-05-31deal with namespace attributesChristian Schneppe1-3/+9
2017-04-26make sure tag writer thread shuts downChristian Schneppe1-8/+7
2017-02-22synchronize modifications of output stream in tag writerChristian Schneppe1-4/+4
2017-02-14only force close tagwriter before creating a new oneChristian Schneppe1-0/+4
2017-01-25make sure to properly stop tagwriterChristian Schneppe2-1/+8
2016-11-19reformat codeChristian Schneppe4-449/+449
2016-08-11catch all throwables when parsing xmlDaniel Gultsch1-2/+2
2016-07-29changed package id inside manifest and projectChristian Schneppe4-0/+522