Skip to content

Commit

Permalink
Remove selected_updates now that everything uses the v2 version (#6461
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hpeebles authored Sep 26, 2024
1 parent 452774c commit ad1b5cd
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 124 deletions.
4 changes: 4 additions & 0 deletions backend/canisters/community/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Increase max stable memory read / write buffer size ([#6440](https://github.com/open-chat-labs/open-chat/pull/6440))
- Simplify prize winner messages to reduce size (part 1) ([#6449](https://github.com/open-chat-labs/open-chat/pull/6449))

### Removed

- Remove `selected_updates` now that everything uses the v2 version ([#6461](https://github.com/open-chat-labs/open-chat/pull/6461))

## [[2.0.1351](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1351-community)] - 2024-09-20

### Changed
Expand Down
16 changes: 0 additions & 16 deletions backend/canisters/community/api/can.did
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,6 @@ type SelectedChannelUpdatesArgs = record {
updates_since : TimestampMillis;
};

type SelectedChannelUpdatesResponse = variant {
Success : SelectedGroupUpdates;
SuccessNoUpdates;
PrivateCommunity;
ChannelNotFound;
PrivateChannel;
};

type SelectedChannelUpdatesV2Response = variant {
Success : SelectedGroupUpdates;
SuccessNoUpdates : TimestampMillis;
Expand Down Expand Up @@ -186,12 +178,6 @@ type SelectedUpdatesArgs = record {
updates_since : TimestampMillis;
};

type SelectedUpdatesResponse = variant {
Success : SelectedUpdatesSuccess;
SuccessNoUpdates;
PrivateCommunity;
};

type SelectedUpdatesV2Response = variant {
Success : SelectedUpdatesSuccess;
SuccessNoUpdates : TimestampMillis;
Expand Down Expand Up @@ -1102,10 +1088,8 @@ service : {
messages_by_message_index : (MessagesByMessageIndexArgs) -> (MessagesByMessageIndexResponse) query;
search_channel : (SearchChannelArgs) -> (SearchChannelResponse) query;
selected_channel_initial : (SelectedChannelInitialArgs) -> (SelectedChannelInitialResponse) query;
selected_channel_updates : (SelectedChannelUpdatesArgs) -> (SelectedChannelUpdatesResponse) query;
selected_channel_updates_v2 : (SelectedChannelUpdatesArgs) -> (SelectedChannelUpdatesV2Response) query;
selected_initial : (SelectedInitialArgs) -> (SelectedInitialResponse) query;
selected_updates : (SelectedUpdatesArgs) -> (SelectedUpdatesResponse) query;
selected_updates_v2 : (SelectedUpdatesArgs) -> (SelectedUpdatesV2Response) query;
summary : (SummaryArgs) -> (SummaryResponse) query;
summary_updates : (SummaryUpdatesArgs) -> (SummaryUpdatesResponse) query;
Expand Down
2 changes: 0 additions & 2 deletions backend/canisters/community/api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ fn main() {
generate_candid_method!(community, messages_by_message_index, query);
generate_candid_method!(community, search_channel, query);
generate_candid_method!(community, selected_channel_initial, query);
generate_candid_method!(community, selected_channel_updates, query);
generate_candid_method!(community, selected_channel_updates_v2, query);
generate_candid_method!(community, selected_initial, query);
generate_candid_method!(community, selected_updates, query);
generate_candid_method!(community, selected_updates_v2, query);
generate_candid_method!(community, summary, query);
generate_candid_method!(community, summary_updates, query);
Expand Down
2 changes: 0 additions & 2 deletions backend/canisters/community/api/src/queries/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ pub mod local_user_index;
pub mod messages_by_message_index;
pub mod search_channel;
pub mod selected_channel_initial;
pub mod selected_channel_updates;
pub mod selected_channel_updates_v2;
pub mod selected_initial;
pub mod selected_updates;
pub mod selected_updates_v2;
pub mod summary;
pub mod summary_updates;
Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions backend/canisters/community/api/src/queries/selected_updates.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ use crate::{read_state, RuntimeState};
use community_canister::selected_channel_updates_v2::{Response::*, *};
use ic_cdk::query;

#[query]
fn selected_channel_updates(args: Args) -> community_canister::selected_channel_updates::Response {
read_state(|state| selected_channel_updates_impl(args, state)).into()
}

#[query]
fn selected_channel_updates_v2(args: Args) -> Response {
read_state(|state| selected_channel_updates_impl(args, state))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ use std::cell::LazyCell;
use std::collections::HashSet;
use types::UserId;

#[query]
fn selected_updates(args: Args) -> community_canister::selected_updates::Response {
read_state(|state| selected_updates_impl(args, state)).into()
}

#[query]
fn selected_updates_v2(args: Args) -> Response {
read_state(|state| selected_updates_impl(args, state))
Expand Down
22 changes: 0 additions & 22 deletions frontend/openchat-agent/src/services/community/candid/idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1579,13 +1579,6 @@ export const idlFactory = ({ IDL }) => {
'latest_event_index' : EventIndex,
'blocked_users_added' : IDL.Vec(UserId),
});
const SelectedChannelUpdatesResponse = IDL.Variant({
'ChannelNotFound' : IDL.Null,
'Success' : SelectedGroupUpdates,
'SuccessNoUpdates' : IDL.Null,
'PrivateCommunity' : IDL.Null,
'PrivateChannel' : IDL.Null,
});
const SelectedChannelUpdatesV2Response = IDL.Variant({
'ChannelNotFound' : IDL.Null,
'Success' : SelectedGroupUpdates,
Expand Down Expand Up @@ -1641,11 +1634,6 @@ export const idlFactory = ({ IDL }) => {
'referrals_added' : IDL.Vec(UserId),
'blocked_users_added' : IDL.Vec(UserId),
});
const SelectedUpdatesResponse = IDL.Variant({
'Success' : SelectedUpdatesSuccess,
'SuccessNoUpdates' : IDL.Null,
'PrivateCommunity' : IDL.Null,
});
const SelectedUpdatesV2Response = IDL.Variant({
'Success' : SelectedUpdatesSuccess,
'SuccessNoUpdates' : TimestampMillis,
Expand Down Expand Up @@ -2224,11 +2212,6 @@ export const idlFactory = ({ IDL }) => {
[SelectedChannelInitialResponse],
['query'],
),
'selected_channel_updates' : IDL.Func(
[SelectedChannelUpdatesArgs],
[SelectedChannelUpdatesResponse],
['query'],
),
'selected_channel_updates_v2' : IDL.Func(
[SelectedChannelUpdatesArgs],
[SelectedChannelUpdatesV2Response],
Expand All @@ -2239,11 +2222,6 @@ export const idlFactory = ({ IDL }) => {
[SelectedInitialResponse],
['query'],
),
'selected_updates' : IDL.Func(
[SelectedUpdatesArgs],
[SelectedUpdatesResponse],
['query'],
),
'selected_updates_v2' : IDL.Func(
[SelectedUpdatesArgs],
[SelectedUpdatesV2Response],
Expand Down
16 changes: 0 additions & 16 deletions frontend/openchat-agent/src/services/community/candid/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2023,11 +2023,6 @@ export interface SelectedChannelUpdatesArgs {
'channel_id' : ChannelId,
'updates_since' : TimestampMillis,
}
export type SelectedChannelUpdatesResponse = { 'ChannelNotFound' : null } |
{ 'Success' : SelectedGroupUpdates } |
{ 'SuccessNoUpdates' : null } |
{ 'PrivateCommunity' : null } |
{ 'PrivateChannel' : null };
export type SelectedChannelUpdatesV2Response = { 'ChannelNotFound' : null } |
{ 'Success' : SelectedGroupUpdates } |
{ 'SuccessNoUpdates' : TimestampMillis } |
Expand Down Expand Up @@ -2064,9 +2059,6 @@ export interface SelectedUpdatesArgs {
'updates_since' : TimestampMillis,
'invite_code' : [] | [bigint],
}
export type SelectedUpdatesResponse = { 'Success' : SelectedUpdatesSuccess } |
{ 'SuccessNoUpdates' : null } |
{ 'PrivateCommunity' : null };
export interface SelectedUpdatesSuccess {
'blocked_users_removed' : Array<UserId>,
'invited_users' : [] | [Array<UserId>],
Expand Down Expand Up @@ -2622,10 +2614,6 @@ export interface _SERVICE {
[SelectedChannelInitialArgs],
SelectedChannelInitialResponse
>,
'selected_channel_updates' : ActorMethod<
[SelectedChannelUpdatesArgs],
SelectedChannelUpdatesResponse
>,
'selected_channel_updates_v2' : ActorMethod<
[SelectedChannelUpdatesArgs],
SelectedChannelUpdatesV2Response
Expand All @@ -2634,10 +2622,6 @@ export interface _SERVICE {
[SelectedInitialArgs],
SelectedInitialResponse
>,
'selected_updates' : ActorMethod<
[SelectedUpdatesArgs],
SelectedUpdatesResponse
>,
'selected_updates_v2' : ActorMethod<
[SelectedUpdatesArgs],
SelectedUpdatesV2Response
Expand Down

0 comments on commit ad1b5cd

Please sign in to comment.