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

Rename UpdateStatus to UpdatePresence #859

Closed
zeylahellyer opened this issue Jun 2, 2021 · 1 comment · Fixed by #902
Closed

Rename UpdateStatus to UpdatePresence #859

zeylahellyer opened this issue Jun 2, 2021 · 1 comment · Fixed by #902
Assignees
Labels
c-model Affects the model crate d-api Change related to Discord's API. m-breaking change Breaks the public API.

Comments

@zeylahellyer
Copy link
Member

The "Update Status" outgoing gateway payload has been renamed to "Update Presence", so we should do the same. Per discord/discord-api-docs@d83d7be.

pub struct UpdateStatus {
pub d: UpdateStatusInfo,
pub op: OpCode,
}
impl UpdateStatus {
pub fn new(
activities: impl Into<Option<Vec<Activity>>>,
afk: bool,
since: impl Into<Option<u64>>,
status: impl Into<Status>,
) -> Self {
Self {
d: UpdateStatusInfo::new(activities, afk, since, status),
op: OpCode::StatusUpdate,
}
}
}
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct UpdateStatusInfo {
pub activities: Option<Vec<Activity>>,
pub afk: bool,
pub since: Option<u64>,
pub status: Status,
}
impl UpdateStatusInfo {

@zeylahellyer zeylahellyer added c-model Affects the model crate m-breaking change Breaks the public API. d-api Change related to Discord's API. chore labels Jun 2, 2021
@7596ff 7596ff self-assigned this Jun 6, 2021
@7596ff
Copy link
Contributor

7596ff commented Jun 6, 2021

Blocked on #891.

7596ff added a commit to 7596ff/twilight that referenced this issue Jun 8, 2021
Renames `UpdateStatus` to `UpdatePresence`, and all similar names, with
the exception of `UpdateStatusInfo` -> `UpdatePresenceData`.

Fixes twilight-rs#859.
@7596ff 7596ff linked a pull request Jun 8, 2021 that will close this issue
7596ff added a commit that referenced this issue Jun 12, 2021
Renames `UpdateStatus` to `UpdatePresence`, and all similar names, with
the exception of `UpdateStatusInfo` -> `UpdatePresencePayload`.

Fixes #859.
7596ff added a commit to 7596ff/twilight that referenced this issue Jun 13, 2021
…light-rs#902)

Renames `UpdateStatus` to `UpdatePresence`, and all similar names, with
the exception of `UpdateStatusInfo` -> `UpdatePresencePayload`.

Fixes twilight-rs#859.
7596ff added a commit to 7596ff/twilight that referenced this issue Jun 13, 2021
…light-rs#902)

Renames `UpdateStatus` to `UpdatePresence`, and all similar names, with
the exception of `UpdateStatusInfo` -> `UpdatePresencePayload`.

Fixes twilight-rs#859.
7596ff added a commit to 7596ff/twilight that referenced this issue Jun 13, 2021
…light-rs#902)

Renames `UpdateStatus` to `UpdatePresence`, and all similar names, with
the exception of `UpdateStatusInfo` -> `UpdatePresencePayload`.

Fixes twilight-rs#859.
7596ff added a commit to 7596ff/twilight that referenced this issue Jun 13, 2021
…light-rs#902)

Renames `UpdateStatus` to `UpdatePresence`, and all similar names, with
the exception of `UpdateStatusInfo` -> `UpdatePresencePayload`.

Fixes twilight-rs#859.
@7596ff 7596ff closed this as completed in 53a8ae0 Jun 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-model Affects the model crate d-api Change related to Discord's API. m-breaking change Breaks the public API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants