mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-18 06:45:51 +00:00
Translate the Dimension integration types to go-neb types
This only applies to Travis CI and the RSS Bot.
This commit is contained in:
parent
a5173fff85
commit
dcda2fa46e
@ -15,6 +15,13 @@ export class NebClient {
|
|||||||
return user.accessToken;
|
return user.accessToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getNebType(type: string): string {
|
||||||
|
if (type === "rss") return "rssbot";
|
||||||
|
if (type === "travisci") return "travis-ci";
|
||||||
|
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
public async updateUser(userId: string, isEnabled: boolean, sync = true, autoAcceptInvites = true): Promise<any> {
|
public async updateUser(userId: string, isEnabled: boolean, sync = true, autoAcceptInvites = true): Promise<any> {
|
||||||
const nebRequest: Client = {
|
const nebRequest: Client = {
|
||||||
UserID: userId,
|
UserID: userId,
|
||||||
@ -30,7 +37,7 @@ export class NebClient {
|
|||||||
public async setServiceConfig(serviceId: string, userId: string, type: string, serviceConfig: any): Promise<any> {
|
public async setServiceConfig(serviceId: string, userId: string, type: string, serviceConfig: any): Promise<any> {
|
||||||
const nebRequest: Service = {
|
const nebRequest: Service = {
|
||||||
ID: serviceId,
|
ID: serviceId,
|
||||||
Type: type,
|
Type: this.getNebType(type),
|
||||||
UserID: userId,
|
UserID: userId,
|
||||||
Config: serviceConfig,
|
Config: serviceConfig,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user