Encrypt IRC channel name for Travis notifications.

See https://github.com/travis-ci/travis-ci/issues/1094
This commit is contained in:
Jimmy Cuadra 2016-12-11 23:26:07 -08:00
parent 69423c5a32
commit 15b01204cc
4 changed files with 57 additions and 1 deletions

View File

@ -3,7 +3,7 @@ notifications:
email: false
irc:
channels:
- "chat.freenode.net#ruma"
- secure: "WtuFMaASfrKlPbXWg7cAzxTLSggrix/jqizB3bdGbZTWg8MR0qoa90U9St6h5ELWMc+7mQjJSky0/KXD9BOVLSlok8E12xb8H5soPMW6GjYAek4+JzUeXPYSKNYkP29ZQc26Z9P9TyN/WvJoXIQbaWfMoPmr/g3Rn4z5PyeQgp1+AC54w5zLPtLLjh+WHPYhRoCT7iAsYlx0UazEw3i+aGyN+UdogimDD9ISUKFHOWyXJGyBzFxSpAYaRESnT4I0rJo6ETBkUbEopXvTRyClOsgEk1HRb82+kVNqkampeSDZyb2aCGLbRESd16xVbcE5J2HYu59p5zc00PINMf2nApDEkN/RHERZ4w9lMaxi/fH1TMQZwoNPEd/5n1EU/SLjKi7o/kLdTKEcZyTMd7IZA+TqXjFhKHQlYouOEv742TcWz3jg5+AEhKqjkcpDZTEuNHyMAS4onHg1M9pK2rVh3xmVQ1V2iYM8yY2+73SefJzigkhtXwgnJEv6fJc8IFSPOHtEUBx2KkZps6sRwUxVz5zMgV+4t1h9l4Mt8wOSojoKSxgtAhsHj8pqPysT7vUJPhY6hzzW2nhVHd8IUt49xRNktUr9s+B7yS1Up6+84GTmPmR3lUa+dbZ1PaI2K8VVyctiA4tbkk/n+EFqXL9FY2Gh8XbaWnb7fpWHrJRuZL4="
use_notice: true
rust:
- "nightly"

View File

@ -15,3 +15,6 @@ ruma-identifiers = "0.4.3"
serde = "0.8.19"
serde_derive = "0.8.19"
serde_json = "0.8.3"
[dependencies.ruma-events]
git = "https://github.com/ruma/ruma-events"

View File

@ -4,6 +4,7 @@
#![feature(proc_macro)]
extern crate ruma_events;
extern crate ruma_identifiers;
extern crate serde;
#[macro_use] extern crate serde_derive;

View File

@ -1 +1,53 @@
//! Endpoints for event context.
/// GET /_matrix/client/r0/rooms/:room_id/context/:event_id
pub mod get_context {
use ruma_identifiers::{EventId, RoomId};
use ruma_events::{RoomEvent, StateEvent};
/// Details about this API endpoint.
pub struct Endpoint;
/// This API endpoint's path parameters.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PathParams {
pub event_id: EventId,
pub room_id: RoomId,
}
/// This API endpoint's query string parameters.
#[derive(Clone, Debug)]
pub struct QueryParams {
pub limit: u8,
}
/// This API endpoint's response.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Response {
pub end: String,
pub event: Box<RoomEvent>,
pub events_after: Vec<Box<RoomEvent>>,
pub events_before: Vec<Box<RoomEvent>>,
pub start: String,
pub state: Vec<Box<StateEvent>>,
}
impl ::Endpoint for Endpoint {
type BodyParams = ();
type PathParams = PathParams;
type QueryParams = QueryParams;
type Response = Response;
fn method() -> ::Method {
::Method::Get
}
fn request_path(params: Self::PathParams) -> String {
format!("/_matrix/client/r0/rooms/{}/context/{}", params.room_id, params.event_id)
}
fn router_path() -> String {
"/_matrix/client/r0/rooms/:room_id/context/:event_id".to_string()
}
}
}