Skip to content

feat(relation): add id/phone contact lookups and add-friend helpers#196

Merged
EdamAme-x merged 2 commits into
evex-dev:mainfrom
botnick:feat/relation-add-friend-by-userid
Jul 5, 2026
Merged

feat(relation): add id/phone contact lookups and add-friend helpers#196
EdamAme-x merged 2 commits into
evex-dev:mainfrom
botnick:feat/relation-add-friend-by-userid

Conversation

@botnick

@botnick botnick commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Adds the contact-lookup endpoints the current app uses on RE4, plus convenience helpers that search then add.

Added to RelationService

  • findContactBySearchIdOrTicketV3({ searchId }) — resolve a Contact from a LINE ID. Official Accounts include the leading @ (e.g. @livecast); personal IDs don't. Previously only the legacy findContactByUserid was exposed.
  • findContactByPhoneV3({ phone }) — resolve a Contact from a phone number in E.164 form (e.g. +66814298575).
  • addFriendByUserId({ userId }) / addFriendByPhone({ phone }) — search, then addFriendByMid with the matching friendAdd:* reference.

Notes

  • Responses are parsed as Contact, so .mid / .displayName are typed.
  • deno check and deno fmt pass.
  • example/relation/addfriend.ts demonstrates all four.

botnick added 2 commits July 5, 2026 18:05
…erId

Resolve a contact from a LINE ID through the current search endpoint on
RE4, and add a convenience method that searches then adds the user. Only
the legacy findContactByUserid was exposed before.

Official Account IDs are supported via the leading "@".
Look up a contact by phone number (E.164) on RE4, plus a convenience
method that searches then adds. Mirrors the id-based lookups.
@botnick botnick changed the title feat(relation): add findContactBySearchIdOrTicketV3 and addFriendByUserId feat(relation): add id/phone contact lookups and add-friend helpers Jul 5, 2026
@EdamAme-x EdamAme-x merged commit 7b5455d into evex-dev:main Jul 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants