mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-14 13:04:59 +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;
|
||||
}
|
||||
|
||||
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> {
|
||||
const nebRequest: Client = {
|
||||
UserID: userId,
|
||||
@ -30,7 +37,7 @@ export class NebClient {
|
||||
public async setServiceConfig(serviceId: string, userId: string, type: string, serviceConfig: any): Promise<any> {
|
||||
const nebRequest: Service = {
|
||||
ID: serviceId,
|
||||
Type: type,
|
||||
Type: this.getNebType(type),
|
||||
UserID: userId,
|
||||
Config: serviceConfig,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user