diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -1435,10 +1435,14 @@ const result = []; + const protocol = threadSpecs[threadInfo.type].protocol(); + const viewerCanUpdateOwnRole = protocol.viewerCanUpdateOwnRole; + if ( canChangeRoles && memberInfo.username && - threadHasAdminRole(threadInfo) + threadHasAdminRole(threadInfo) && + (!memberInfo.isViewer || viewerCanUpdateOwnRole) ) { result.push('change_role'); } diff --git a/lib/shared/threads/protocols/dm-thread-protocol.js b/lib/shared/threads/protocols/dm-thread-protocol.js --- a/lib/shared/threads/protocols/dm-thread-protocol.js +++ b/lib/shared/threads/protocols/dm-thread-protocol.js @@ -933,6 +933,7 @@ color: true, }, supportsBackgroundNotifs: true, + viewerCanUpdateOwnRole: false, }); function pendingThreadType(numberOfOtherMembers: number) { diff --git a/lib/shared/threads/protocols/farcaster-thread-protocol.js b/lib/shared/threads/protocols/farcaster-thread-protocol.js --- a/lib/shared/threads/protocols/farcaster-thread-protocol.js +++ b/lib/shared/threads/protocols/farcaster-thread-protocol.js @@ -606,6 +606,7 @@ color: false, }, supportsBackgroundNotifs: false, + viewerCanUpdateOwnRole: false, }; function pendingThreadType(numberOfOtherMembers: number) { diff --git a/lib/shared/threads/protocols/keyserver-thread-protocol.js b/lib/shared/threads/protocols/keyserver-thread-protocol.js --- a/lib/shared/threads/protocols/keyserver-thread-protocol.js +++ b/lib/shared/threads/protocols/keyserver-thread-protocol.js @@ -713,6 +713,7 @@ color: true, }, supportsBackgroundNotifs: true, + viewerCanUpdateOwnRole: true, }); function pendingThreadType(numberOfOtherMembers: number) { diff --git a/lib/shared/threads/thread-spec.js b/lib/shared/threads/thread-spec.js --- a/lib/shared/threads/thread-spec.js +++ b/lib/shared/threads/thread-spec.js @@ -480,6 +480,7 @@ +color: boolean, }, +supportsBackgroundNotifs: boolean, + +viewerCanUpdateOwnRole: boolean, }; export type ThreadSpec<