Skip to content

Commit

Permalink
Fix to make emoji work in push groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
moxie0 committed Feb 25, 2014
1 parent 43c1576 commit 52ff4ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/org/thoughtcrime/securesms/mms/TextSlide.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ private static PduPart getPartForMessage(String message) {
PduPart part = new PduPart();

try {
part.setData(message.getBytes(CharacterSets.MIMENAME_ISO_8859_1));
part.setData(message.getBytes(CharacterSets.MIMENAME_UTF_8));

if (part.getData().length == 0)
throw new AssertionError("Part data should not be zero!");

} catch (UnsupportedEncodingException e) {
Log.w("TextSlide", "ISO_8859_1 must be supported!", e);
part.setData("Unsupported character set!".getBytes());
}
part.setCharset(CharacterSets.ISO_8859_1);

part.setCharset(CharacterSets.UTF_8);
part.setContentType(ContentType.TEXT_PLAIN.getBytes());
part.setContentId((System.currentTimeMillis()+"").getBytes());
part.setName(("Text"+System.currentTimeMillis()).getBytes());
Expand Down

1 comment on commit 52ff4ec

@WhisperBTC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! BitHub has sent payment of $102.12USD for this commit.

Please sign in to comment.