Skip to content

Commit

Permalink
Re-notify User canister after attempting to join if already in channel (
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Dec 3, 2024
1 parent 7d93fc2 commit 5a0f95a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions backend/canisters/local_user_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Add chat + command text to bot command claims ([#6929](https://github.com/open-chat-labs/open-chat/pull/6929))
- Enable job to check User canister cycles balances ([#6959](https://github.com/open-chat-labs/open-chat/pull/6959))
- Re-notify User canister after attempting to join if already in channel ([#6964](https://github.com/open-chat-labs/open-chat/pull/6964))

## [[2.0.1481](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1481-local_user_index)] - 2024-11-29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ async fn join_channel(args: Args) -> Response {
};
match community_canister_c2c_client::c2c_join_channel(args.community_id.into(), &c2c_args).await {
Ok(response) => match response {
community_canister::c2c_join_channel::Response::Success(s) => {
community_canister::c2c_join_channel::Response::Success(s)
| community_canister::c2c_join_channel::Response::AlreadyInChannel(s) => {
if !is_bot {
mutate_state(|state| state.notify_user_joined_channel(user_details.user_id, args.community_id, &s));
}
Expand All @@ -40,7 +41,6 @@ async fn join_channel(args: Args) -> Response {
}
SuccessJoinedCommunity(s)
}
community_canister::c2c_join_channel::Response::AlreadyInChannel(s) => AlreadyInChannel(s),
community_canister::c2c_join_channel::Response::GateCheckFailed(msg) => GateCheckFailed(msg),
community_canister::c2c_join_channel::Response::UserNotInCommunity => CommunityNotPublic,
community_canister::c2c_join_channel::Response::ChannelNotFound => ChannelNotFound,
Expand Down

0 comments on commit 5a0f95a

Please sign in to comment.