mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 12:46:58 +02:00
Rename isIRCStyleCommand to sendAsIRCStyleCommandIfPossible
This commit is contained in:
@@ -394,7 +394,7 @@ typedef NS_ENUM(NSUInteger, MXKRoomViewControllerJoinRoomResult) {
|
||||
@param string to analyse
|
||||
@return YES if IRC style command has been detected and interpreted.
|
||||
*/
|
||||
- (BOOL)isIRCStyleCommand:(NSString*)string;
|
||||
- (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string;
|
||||
|
||||
/**
|
||||
Mention the member display name in the current text of the message composer.
|
||||
|
||||
@@ -1250,7 +1250,7 @@
|
||||
customEventDetailsViewClass = eventDetailsViewClass;
|
||||
}
|
||||
|
||||
- (BOOL)isIRCStyleCommand:(NSString*)string
|
||||
- (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string
|
||||
{
|
||||
// Check whether the provided text may be an IRC-style command
|
||||
if ([string hasPrefix:@"/"] == NO || [string hasPrefix:@"//"] == YES)
|
||||
@@ -3375,7 +3375,7 @@
|
||||
- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView sendTextMessage:(NSString*)textMessage
|
||||
{
|
||||
// Handle potential IRC commands in typed string
|
||||
if ([self isIRCStyleCommand:textMessage] == NO)
|
||||
if ([self sendAsIRCStyleCommandIfPossible:textMessage] == NO)
|
||||
{
|
||||
// Send text message in the current room
|
||||
[self sendTextMessage:textMessage];
|
||||
|
||||
@@ -1228,7 +1228,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)isIRCStyleCommand:(NSString*)string
|
||||
- (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string
|
||||
{
|
||||
// Override the default behavior for `/join` command in order to open automatically the joined room
|
||||
|
||||
@@ -1271,7 +1271,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
return [super isIRCStyleCommand:string];
|
||||
return [super sendAsIRCStyleCommandIfPossible:string];
|
||||
}
|
||||
|
||||
- (void)setKeyboardHeight:(CGFloat)keyboardHeight
|
||||
@@ -4816,7 +4816,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
message = attributedTextMessage.string;
|
||||
}
|
||||
// Try to send the slash command
|
||||
isMessageAHandledCommand = [self isIRCStyleCommand:message];
|
||||
isMessageAHandledCommand = [self sendAsIRCStyleCommandIfPossible:message];
|
||||
}
|
||||
|
||||
if (!isMessageAHandledCommand)
|
||||
|
||||
Reference in New Issue
Block a user