Merge pull request #1 from DaxDupont/groupchatfix
Fixes sending group chat with a string for the group argument
This commit is contained in:
@@ -15,6 +15,6 @@ export declare class CommunicationsCommands extends CommandsBase {
|
||||
acceptGroupInvite(event: GroupInviteEvent): Promise<void>;
|
||||
rejectGroupInvite(event: GroupInviteEvent): Promise<void>;
|
||||
typeInstantMessage(to: UUID | string, message: string, thinkingTime?: number, charactersPerSecond?: number): Promise<void>;
|
||||
sendGroupMessage(groupID: UUID, message: string): Promise<void>;
|
||||
sendGroupMessage(groupID: UUID | string, message: string): Promise<void>;
|
||||
typeLocalMessage(message: string, thinkingTime?: number, charactersPerSecond?: number): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -226,6 +226,7 @@ class CommunicationsCommands extends CommandsBase_1.CommandsBase {
|
||||
this.startTypingIM(to).then(() => {
|
||||
typeTimer = setInterval(() => {
|
||||
this.startTypingIM(to).catch(() => {
|
||||
// ignore
|
||||
});
|
||||
}, 5000);
|
||||
if (charactersPerSecond === undefined) {
|
||||
@@ -258,6 +259,9 @@ class CommunicationsCommands extends CommandsBase_1.CommandsBase {
|
||||
});
|
||||
}
|
||||
sendGroupMessage(groupID, message) {
|
||||
if (typeof groupID === 'string') {
|
||||
groupID = new UUID_1.UUID(groupID);
|
||||
}
|
||||
const circuit = this.circuit;
|
||||
const agentName = this.agent.firstName + ' ' + this.agent.lastName;
|
||||
const im = new ImprovedInstantMessage_1.ImprovedInstantMessageMessage();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -305,8 +305,12 @@ export class CommunicationsCommands extends CommandsBase
|
||||
});
|
||||
}
|
||||
|
||||
sendGroupMessage(groupID: UUID, message: string): Promise<void>
|
||||
sendGroupMessage(groupID: UUID | string, message: string): Promise<void>
|
||||
{
|
||||
if (typeof groupID === 'string')
|
||||
{
|
||||
groupID = new UUID(groupID);
|
||||
}
|
||||
const circuit = this.circuit;
|
||||
const agentName = this.agent.firstName + ' ' + this.agent.lastName;
|
||||
const im: ImprovedInstantMessageMessage = new ImprovedInstantMessageMessage();
|
||||
|
||||
Reference in New Issue
Block a user