Commit d353baa
fix(feishu): preserve sender identity and resolve mentions in merge_forward messages
Prepend each sub-message with its sender open_id and resolve @_user_N
mention placeholders back to real names via the mentions array in the
Feishu API response.
- Sort mentions by key length descending to prevent partial-match
collisions (e.g. @_user_1 matching @_user_10)
- Normalize mention IDs for both string and object shapes, with
union_id fallback
- Use callback replacement to avoid $ substitution in display names
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1b81ed6 commit d353baa
2 files changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| |||
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
241 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
242 | 267 | | |
243 | 268 | | |
244 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1898 | 1898 | | |
1899 | 1899 | | |
1900 | 1900 | | |
| 1901 | + | |
1901 | 1902 | | |
1902 | 1903 | | |
1903 | 1904 | | |
1904 | 1905 | | |
1905 | 1906 | | |
1906 | 1907 | | |
1907 | 1908 | | |
| 1909 | + | |
1908 | 1910 | | |
1909 | 1911 | | |
1910 | 1912 | | |
| |||
1954 | 1956 | | |
1955 | 1957 | | |
1956 | 1958 | | |
1957 | | - | |
| 1959 | + | |
1958 | 1960 | | |
1959 | 1961 | | |
1960 | 1962 | | |
| |||
0 commit comments