Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slash command to manually discard outbound session #6668

Merged
merged 2 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Riot/Modules/MatrixKit/Models/Room/MXKSlashCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ FOUNDATION_EXPORT NSString *const kMXKSlashCmdUnbanUser;
FOUNDATION_EXPORT NSString *const kMXKSlashCmdSetUserPowerLevel;
FOUNDATION_EXPORT NSString *const kMXKSlashCmdResetUserPowerLevel;
FOUNDATION_EXPORT NSString *const kMXKSlashCmdChangeRoomTopic;
FOUNDATION_EXPORT NSString *const kMXKSlashCmdDiscardSession;
1 change: 1 addition & 0 deletions Riot/Modules/MatrixKit/Models/Room/MXKSlashCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
NSString *const kMXKSlashCmdSetUserPowerLevel = @"/op";
NSString *const kMXKSlashCmdResetUserPowerLevel = @"/deop";
NSString *const kMXKSlashCmdChangeRoomTopic = @"/topic";
NSString *const kMXKSlashCmdDiscardSession = @"/discardsession";
6 changes: 6 additions & 0 deletions Riot/Modules/Room/MXKRoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,12 @@ - (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string
cmdUsage = @"Usage: /topic <topic>";
}
}
else if ([string hasPrefix:kMXKSlashCmdDiscardSession])
{
[roomDataSource.mxSession.crypto discardOutboundGroupSessionForRoomWithRoomId:roomDataSource.roomId onComplete:^{
MXLogDebug(@"[MXKRoomVC] Manually discarded outbound group session");
}];
}
else
{
// Retrieve userId
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-6668.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Crypto: Slash command to discard outbound session