Skip to content

Commit 1d401c5

Browse files
committed
add utils file
1 parent 0576148 commit 1d401c5

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

apps/sim/tools/microsoft_teams/utils.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ export interface TeamsMention {
2121
mentionText: string
2222
mentioned:
2323
| {
24-
id: string
25-
name: string
26-
userIdentityType?: string
24+
user: {
25+
id: string
26+
displayName: string
27+
userIdentityType?: string
28+
}
2729
}
2830
| {
2931
application: {
@@ -248,9 +250,11 @@ export async function resolveMentionsForChat(
248250
id: mention.mentionId,
249251
mentionText: mention.name,
250252
mentioned: {
251-
id: member.id,
252-
name: member.displayName,
253-
userIdentityType: member.userIdentityType,
253+
user: {
254+
id: member.id,
255+
displayName: member.displayName,
256+
userIdentityType: member.userIdentityType || 'aadUser',
257+
},
254258
},
255259
})
256260
}
@@ -313,9 +317,11 @@ export async function resolveMentionsForChannel(
313317
id: mention.mentionId,
314318
mentionText: mention.name,
315319
mentioned: {
316-
id: member.id,
317-
name: member.displayName,
318-
userIdentityType: member.userIdentityType,
320+
user: {
321+
id: member.id,
322+
displayName: member.displayName,
323+
userIdentityType: member.userIdentityType || 'aadUser',
324+
},
319325
},
320326
})
321327
}

0 commit comments

Comments
 (0)