Skip to content

Commit

Permalink
missed chats
Browse files Browse the repository at this point in the history
  • Loading branch information
overtake committed Jan 11, 2017
1 parent d46aa15 commit 40c5077
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion TelegramTest/MessageSender.m
Original file line number Diff line number Diff line change
Expand Up @@ -964,13 +964,16 @@ +(RPCRequest *)proccessInlineKeyboardButton:(TLKeyboardButton *)keyboard message
} else if([keyboard isKindOfClass:[TL_keyboardButtonSwitchInline class]]) {

if(keyboard.isSame_peer) {
TLUser *user = message.via_bot_id != 0 ? message.via_bot_user : message.fromUser;


TGInputMessageTemplate *template = [TGInputMessageTemplate templateWithType:TGInputMessageTemplateTypeSimpleText ofPeerId:conversation.peer_id];

if([conversation.chat isKindOfClass:[TLChat class]]) {
[template setReplyMessage:message save:YES];
}

[template updateTextAndSave:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"@%@ %@",message.fromUser.username, keyboard.query]]];
[template updateTextAndSave:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"@%@ %@",user.username, keyboard.query]]];
[template performNotification];
} else {
if(messagesViewController.class == [TGContextMessagesvViewController class]) {
Expand Down
2 changes: 1 addition & 1 deletion TelegramTest/Telegraph-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>51468</string>
<string>51470</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.social-networking</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit 40c5077

Please sign in to comment.