-
Notifications
You must be signed in to change notification settings - Fork 437
[NEW] Reaction and emoji #2795
base: develop
Are you sure you want to change the base?
[NEW] Reaction and emoji #2795
Conversation
|
|
||
| let string3 = "+upside_down:" | ||
| XCTAssertNil(string3.reaction()) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
|
||
| let string2 = ":upside_down:" | ||
| XCTAssertNil(string2.reaction()) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
| } | ||
|
|
||
| XCTAssertEqual(emoji, ":upside_down:") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
| guard let emoji = string.reaction() else { | ||
| return XCTFail("string is valid reaction") | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
|
||
| func testReaction() { | ||
| let string = "+:upside_down:" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
|
||
| XCTAssertNil(string2.commandAndParams()) | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
|
||
| let emoji = String(self.dropFirst()) | ||
| guard emoji.first == ":" && emoji.last == ":" else { return nil } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
|
|
||
| func reaction() -> String? { | ||
| guard self.first == "+" && self.count > 1 else { return nil } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
| let params = components.dropFirst().joined(separator: " ") | ||
| return (command: command, params: params) | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
7ea400e to
131afc4
Compare
@RocketChat/ios
Closes #2638
Closes #2627