[keyserver] Update usage of threads.default_role in thread-permission-updaters.js
Summary:
We need to get rid of usages of threads.default_role throughout the codebase so we can eventually drop the column.
This diff handles the usage in thread-permission-updaters.js
Existing code: When creating a new thread, changeRole(id, initialMembers, null) is called. The null role here specifies that a user is being added here, so this is the case we'll have to update. In changeRole, changeRoleThreadQuery(threadID, role) is called to get the intended role and permissions for the users being added to the thread. Naturally, this is the default_role column in MariaDB.
Depends on D9978
Addresses part of ENG-5833
Test Plan: Made sure that when new members were added, they are still assigned the default_role. Also ran the query before and after in TablePlus and made sure that the old default_role column value was equal to the new id column value.
Reviewers: atul, ginsu, tomek
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D9979